reverse_apply.hpp 889 B

123456789101112131415161718192021222324252627
  1. /*!
  2. @file
  3. Defines `boost::hana::detail::variadic::reverse_apply`.
  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_VARIADIC_REVERSE_APPLY_HPP
  9. #define BOOST_HANA_DETAIL_VARIADIC_REVERSE_APPLY_HPP
  10. #include <boost/hana/config.hpp>
  11. #include <boost/hana/detail/variadic/reverse_apply/unrolled.hpp>
  12. BOOST_HANA_NAMESPACE_BEGIN namespace detail { namespace variadic {
  13. BOOST_HANA_CONSTEXPR_LAMBDA auto reverse_apply =
  14. [](auto&& f, auto&& ...x) -> decltype(auto) {
  15. return detail::variadic::reverse_apply_unrolled(
  16. static_cast<decltype(f)>(f),
  17. static_cast<decltype(x)>(x)...
  18. );
  19. };
  20. }} BOOST_HANA_NAMESPACE_END
  21. #endif // !BOOST_HANA_DETAIL_VARIADIC_REVERSE_APPLY_HPP