stabilize build system: depends, installer, boost/bdb fixes, cross targets groundwork

This commit is contained in:
2026-02-24 18:38:47 +00:00
parent da8c28aaeb
commit 65cb2619a7
13106 changed files with 2484322 additions and 1804 deletions
@@ -0,0 +1,34 @@
/*!
@file
Defines `boost::hana::detail::operators::adl`.
@copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_DETAIL_OPERATORS_ADL_HPP
#define BOOST_HANA_DETAIL_OPERATORS_ADL_HPP
#include <boost/hana/config.hpp>
BOOST_HANA_NAMESPACE_BEGIN namespace detail { namespace operators {
//! @ingroup group-details
//! Enables [ADL](http://en.cppreference.com/w/cpp/language/adl) in the
//! `hana::detail::operators` namespace.
//!
//! This is used by containers in Hana as a quick way to automatically
//! define the operators associated to some concepts, in conjunction
//! with the `detail::xxx_operators` family of metafunctions.
//!
//! Note that `adl` can be passed template arguments to make it unique
//! amongst a set of derived classes. This allows a set of derived classes
//! not to possess a common base class, which would disable the EBO when
//! many of these derived classes are stored in a Hana container. If EBO
//! is not a concern, `adl<>` can simply be used.
template <typename ...>
struct adl { };
}} BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_DETAIL_OPERATORS_ADL_HPP
@@ -0,0 +1,78 @@
/*!
@file
Defines arithmetic operators.
@copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_DETAIL_OPERATORS_ARITHMETIC_HPP
#define BOOST_HANA_DETAIL_OPERATORS_ARITHMETIC_HPP
#include <boost/hana/config.hpp>
#include <boost/hana/core/tag_of.hpp>
#include <boost/hana/fwd/div.hpp>
#include <boost/hana/fwd/minus.hpp>
#include <boost/hana/fwd/mod.hpp>
#include <boost/hana/fwd/mult.hpp>
#include <boost/hana/fwd/negate.hpp>
#include <boost/hana/fwd/plus.hpp>
#include <type_traits>
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
template <typename Tag>
struct arithmetic_operators {
static constexpr bool value = false;
};
namespace operators {
template <typename X, typename Y, typename = typename std::enable_if<
detail::arithmetic_operators<typename hana::tag_of<X>::type>::value ||
detail::arithmetic_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator+(X&& x, Y&& y)
{ return hana::plus(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::arithmetic_operators<typename hana::tag_of<X>::type>::value ||
detail::arithmetic_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator-(X&& x, Y&& y)
{ return hana::minus(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename = typename std::enable_if<
detail::arithmetic_operators<typename hana::tag_of<X>::type>::value
>::type>
constexpr auto operator-(X&& x)
{ return hana::negate(static_cast<X&&>(x)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::arithmetic_operators<typename hana::tag_of<X>::type>::value ||
detail::arithmetic_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator*(X&& x, Y&& y)
{ return hana::mult(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::arithmetic_operators<typename hana::tag_of<X>::type>::value ||
detail::arithmetic_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator/(X&& x, Y&& y)
{ return hana::div(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::arithmetic_operators<typename hana::tag_of<X>::type>::value ||
detail::arithmetic_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator%(X&& x, Y&& y)
{ return hana::mod(static_cast<X&&>(x), static_cast<Y&&>(y)); }
} // end namespace operators
} BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_DETAIL_OPERATORS_ARITHMETIC_HPP
@@ -0,0 +1,44 @@
/*!
@file
Defines operators for Comparables.
@copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_DETAIL_OPERATORS_COMPARABLE_HPP
#define BOOST_HANA_DETAIL_OPERATORS_COMPARABLE_HPP
#include <boost/hana/config.hpp>
#include <boost/hana/core/tag_of.hpp>
#include <boost/hana/fwd/equal.hpp>
#include <boost/hana/fwd/not_equal.hpp>
#include <type_traits>
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
template <typename Tag>
struct comparable_operators {
static constexpr bool value = false;
};
namespace operators {
template <typename X, typename Y, typename = typename std::enable_if<
detail::comparable_operators<typename hana::tag_of<X>::type>::value ||
detail::comparable_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator==(X&& x, Y&& y)
{ return hana::equal(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::comparable_operators<typename hana::tag_of<X>::type>::value ||
detail::comparable_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator!=(X&& x, Y&& y)
{ return hana::not_equal(static_cast<X&&>(x), static_cast<Y&&>(y)); }
} // end namespace operators
} BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_DETAIL_OPERATORS_COMPARABLE_HPP
@@ -0,0 +1,40 @@
/*!
@file
Defines operators for Iterables.
@copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_DETAIL_OPERATORS_ITERABLE_HPP
#define BOOST_HANA_DETAIL_OPERATORS_ITERABLE_HPP
#include <boost/hana/config.hpp>
#include <boost/hana/fwd/at.hpp>
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
template <typename Derived>
struct iterable_operators {
template <typename N>
constexpr decltype(auto) operator[](N&& n) & {
return hana::at(static_cast<Derived&>(*this),
static_cast<N&&>(n));
}
template <typename N>
constexpr decltype(auto) operator[](N&& n) const& {
return hana::at(static_cast<Derived const&>(*this),
static_cast<N&&>(n));
}
template <typename N>
constexpr decltype(auto) operator[](N&& n) && {
return hana::at(static_cast<Derived&&>(*this),
static_cast<N&&>(n));
}
};
} BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_DETAIL_OPERATORS_ITERABLE_HPP
@@ -0,0 +1,51 @@
/*!
@file
Defines logical operators.
@copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_DETAIL_OPERATORS_LOGICAL_HPP
#define BOOST_HANA_DETAIL_OPERATORS_LOGICAL_HPP
#include <boost/hana/config.hpp>
#include <boost/hana/core/tag_of.hpp>
#include <boost/hana/fwd/and.hpp>
#include <boost/hana/fwd/not.hpp>
#include <boost/hana/fwd/or.hpp>
#include <type_traits>
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
template <typename Tag>
struct logical_operators {
static constexpr bool value = false;
};
namespace operators {
template <typename X, typename Y, typename = typename std::enable_if<
detail::logical_operators<typename hana::tag_of<X>::type>::value ||
detail::logical_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator||(X&& x, Y&& y)
{ return hana::or_(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::logical_operators<typename hana::tag_of<X>::type>::value ||
detail::logical_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator&&(X&& x, Y&& y)
{ return hana::and_(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename = typename std::enable_if<
detail::logical_operators<typename hana::tag_of<X>::type>::value
>::type>
constexpr auto operator!(X&& x)
{ return hana::not_(static_cast<X&&>(x)); }
} // end namespace operators
} BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_DETAIL_OPERATORS_LOGICAL_HPP
@@ -0,0 +1,35 @@
/*!
@file
Defines operators for Monads.
@copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_DETAIL_OPERATORS_MONAD_HPP
#define BOOST_HANA_DETAIL_OPERATORS_MONAD_HPP
#include <boost/hana/config.hpp>
#include <boost/hana/core/tag_of.hpp>
#include <boost/hana/fwd/chain.hpp>
#include <type_traits>
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
template <typename Tag>
struct monad_operators {
static constexpr bool value = false;
};
namespace operators {
template <typename Xs, typename F, typename = typename std::enable_if<
detail::monad_operators<typename hana::tag_of<Xs>::type>::value
>::type>
constexpr auto operator|(Xs&& xs, F&& f)
{ return hana::chain(static_cast<Xs&&>(xs), static_cast<F&&>(f)); }
} // end namespace operators
} BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_DETAIL_OPERATORS_MONAD_HPP
@@ -0,0 +1,60 @@
/*!
@file
Defines operators for Orderables.
@copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_DETAIL_OPERATORS_ORDERABLE_HPP
#define BOOST_HANA_DETAIL_OPERATORS_ORDERABLE_HPP
#include <boost/hana/config.hpp>
#include <boost/hana/core/tag_of.hpp>
#include <boost/hana/fwd/greater.hpp>
#include <boost/hana/fwd/greater_equal.hpp>
#include <boost/hana/fwd/less.hpp>
#include <boost/hana/fwd/less_equal.hpp>
#include <type_traits>
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
template <typename Tag>
struct orderable_operators {
static constexpr bool value = false;
};
namespace operators {
template <typename X, typename Y, typename = typename std::enable_if<
detail::orderable_operators<typename hana::tag_of<X>::type>::value ||
detail::orderable_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator<(X&& x, Y&& y)
{ return hana::less(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::orderable_operators<typename hana::tag_of<X>::type>::value ||
detail::orderable_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator>(X&& x, Y&& y)
{ return hana::greater(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::orderable_operators<typename hana::tag_of<X>::type>::value ||
detail::orderable_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator<=(X&& x, Y&& y)
{ return hana::less_equal(static_cast<X&&>(x), static_cast<Y&&>(y)); }
template <typename X, typename Y, typename = typename std::enable_if<
detail::orderable_operators<typename hana::tag_of<X>::type>::value ||
detail::orderable_operators<typename hana::tag_of<Y>::type>::value
>::type>
constexpr auto operator>=(X&& x, Y&& y)
{ return hana::greater_equal(static_cast<X&&>(x), static_cast<Y&&>(y)); }
} // end namespace operators
} BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_DETAIL_OPERATORS_ORDERABLE_HPP
@@ -0,0 +1,40 @@
/*!
@file
Defines operators for Searchables.
@copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_HANA_DETAIL_OPERATORS_SEARCHABLE_HPP
#define BOOST_HANA_DETAIL_OPERATORS_SEARCHABLE_HPP
#include <boost/hana/config.hpp>
#include <boost/hana/fwd/at_key.hpp>
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
template <typename Derived>
struct searchable_operators {
template <typename Key>
constexpr decltype(auto) operator[](Key&& key) & {
return hana::at_key(static_cast<Derived&>(*this),
static_cast<Key&&>(key));
}
template <typename Key>
constexpr decltype(auto) operator[](Key&& key) && {
return hana::at_key(static_cast<Derived&&>(*this),
static_cast<Key&&>(key));
}
template <typename Key>
constexpr decltype(auto) operator[](Key&& key) const& {
return hana::at_key(static_cast<Derived const&>(*this),
static_cast<Key&&>(key));
}
};
} BOOST_HANA_NAMESPACE_END
#endif // !BOOST_HANA_DETAIL_OPERATORS_SEARCHABLE_HPP