update boost
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
@file
|
||||
Defines `boost::hana::detail::operators::adl`.
|
||||
|
||||
@copyright Louis Dionne 2013-2017
|
||||
Copyright Louis Dionne 2013-2022
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
@@ -13,7 +13,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/hana/config.hpp>
|
||||
|
||||
|
||||
BOOST_HANA_NAMESPACE_BEGIN namespace detail { namespace operators {
|
||||
namespace boost { namespace hana { namespace detail { namespace operators {
|
||||
//! @ingroup group-details
|
||||
//! Enables [ADL](http://en.cppreference.com/w/cpp/language/adl) in the
|
||||
//! `hana::detail::operators` namespace.
|
||||
@@ -29,6 +29,6 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail { namespace operators {
|
||||
//! is not a concern, `adl<>` can simply be used.
|
||||
template <typename ...>
|
||||
struct adl { };
|
||||
}} BOOST_HANA_NAMESPACE_END
|
||||
}} }} // end namespace boost::hana
|
||||
|
||||
#endif // !BOOST_HANA_DETAIL_OPERATORS_ADL_HPP
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@file
|
||||
Defines arithmetic operators.
|
||||
|
||||
@copyright Louis Dionne 2013-2017
|
||||
Copyright Louis Dionne 2013-2022
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
@@ -22,7 +22,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
namespace boost { namespace hana { namespace detail {
|
||||
template <typename Tag>
|
||||
struct arithmetic_operators {
|
||||
static constexpr bool value = false;
|
||||
@@ -73,6 +73,6 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
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
|
||||
} }} // end namespace boost::hana
|
||||
|
||||
#endif // !BOOST_HANA_DETAIL_OPERATORS_ARITHMETIC_HPP
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@file
|
||||
Defines operators for Comparables.
|
||||
|
||||
@copyright Louis Dionne 2013-2017
|
||||
Copyright Louis Dionne 2013-2022
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
@@ -18,7 +18,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
namespace boost { namespace hana { namespace detail {
|
||||
template <typename Tag>
|
||||
struct comparable_operators {
|
||||
static constexpr bool value = false;
|
||||
@@ -26,19 +26,27 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
|
||||
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
|
||||
!detail::has_idempotent_tag<X>::value &&
|
||||
!detail::has_idempotent_tag<Y>::value &&
|
||||
(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
|
||||
!detail::has_idempotent_tag<X>::value &&
|
||||
!detail::has_idempotent_tag<Y>::value &&
|
||||
(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
|
||||
} }} // end namespace boost::hana
|
||||
|
||||
#endif // !BOOST_HANA_DETAIL_OPERATORS_COMPARABLE_HPP
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@file
|
||||
Defines operators for Iterables.
|
||||
|
||||
@copyright Louis Dionne 2013-2017
|
||||
Copyright Louis Dionne 2013-2022
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
@@ -14,7 +14,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/hana/fwd/at.hpp>
|
||||
|
||||
|
||||
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
namespace boost { namespace hana { namespace detail {
|
||||
template <typename Derived>
|
||||
struct iterable_operators {
|
||||
template <typename N>
|
||||
@@ -35,6 +35,6 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
static_cast<N&&>(n));
|
||||
}
|
||||
};
|
||||
} BOOST_HANA_NAMESPACE_END
|
||||
} }} // end namespace boost::hana
|
||||
|
||||
#endif // !BOOST_HANA_DETAIL_OPERATORS_ITERABLE_HPP
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@file
|
||||
Defines logical operators.
|
||||
|
||||
@copyright Louis Dionne 2013-2017
|
||||
Copyright Louis Dionne 2013-2022
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
@@ -19,7 +19,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
namespace boost { namespace hana { namespace detail {
|
||||
template <typename Tag>
|
||||
struct logical_operators {
|
||||
static constexpr bool value = false;
|
||||
@@ -46,6 +46,6 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
constexpr auto operator!(X&& x)
|
||||
{ return hana::not_(static_cast<X&&>(x)); }
|
||||
} // end namespace operators
|
||||
} BOOST_HANA_NAMESPACE_END
|
||||
} }} // end namespace boost::hana
|
||||
|
||||
#endif // !BOOST_HANA_DETAIL_OPERATORS_LOGICAL_HPP
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@file
|
||||
Defines operators for Monads.
|
||||
|
||||
@copyright Louis Dionne 2013-2017
|
||||
Copyright Louis Dionne 2013-2022
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
@@ -17,7 +17,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
namespace boost { namespace hana { namespace detail {
|
||||
template <typename Tag>
|
||||
struct monad_operators {
|
||||
static constexpr bool value = false;
|
||||
@@ -30,6 +30,6 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
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
|
||||
} }} // end namespace boost::hana
|
||||
|
||||
#endif // !BOOST_HANA_DETAIL_OPERATORS_MONAD_HPP
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@file
|
||||
Defines operators for Orderables.
|
||||
|
||||
@copyright Louis Dionne 2013-2017
|
||||
Copyright Louis Dionne 2013-2022
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
@@ -20,7 +20,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
namespace boost { namespace hana { namespace detail {
|
||||
template <typename Tag>
|
||||
struct orderable_operators {
|
||||
static constexpr bool value = false;
|
||||
@@ -55,6 +55,6 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
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
|
||||
} }} // end namespace boost::hana
|
||||
|
||||
#endif // !BOOST_HANA_DETAIL_OPERATORS_ORDERABLE_HPP
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@file
|
||||
Defines operators for Searchables.
|
||||
|
||||
@copyright Louis Dionne 2013-2017
|
||||
Copyright Louis Dionne 2013-2022
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
@@ -14,7 +14,7 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
#include <boost/hana/fwd/at_key.hpp>
|
||||
|
||||
|
||||
BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
namespace boost { namespace hana { namespace detail {
|
||||
template <typename Derived>
|
||||
struct searchable_operators {
|
||||
template <typename Key>
|
||||
@@ -35,6 +35,6 @@ BOOST_HANA_NAMESPACE_BEGIN namespace detail {
|
||||
static_cast<Key&&>(key));
|
||||
}
|
||||
};
|
||||
} BOOST_HANA_NAMESPACE_END
|
||||
} }} // end namespace boost::hana
|
||||
|
||||
#endif // !BOOST_HANA_DETAIL_OPERATORS_SEARCHABLE_HPP
|
||||
|
||||
Reference in New Issue
Block a user