nested_than.hpp 854 B

1234567891011121314151617181920212223242526272829
  1. /*!
  2. @file
  3. Defines `boost::hana::detail::nested_than`.
  4. @copyright Louis Dionne 2013-2017
  5. Distributed under the Boost Software License, Version 1.0.
  6. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
  7. */
  8. #ifndef BOOST_HANA_DETAIL_NESTED_THAN_HPP
  9. #define BOOST_HANA_DETAIL_NESTED_THAN_HPP
  10. #include <boost/hana/detail/nested_than_fwd.hpp>
  11. #include <boost/hana/config.hpp>
  12. #include <boost/hana/functional/flip.hpp>
  13. #include <boost/hana/functional/partial.hpp>
  14. BOOST_HANA_NAMESPACE_BEGIN namespace detail {
  15. //! @cond
  16. template <typename Algorithm>
  17. template <typename X>
  18. constexpr decltype(auto) nested_than_t<Algorithm>::operator()(X&& x) const
  19. { return hana::partial(hana::flip(Algorithm{}), static_cast<X&&>(x)); }
  20. //! @endcond
  21. } BOOST_HANA_NAMESPACE_END
  22. #endif // !BOOST_HANA_DETAIL_NESTED_THAN_HPP