123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #ifndef BOOST_HANA_FWD_IF_HPP
- #define BOOST_HANA_FWD_IF_HPP
- #include <boost/hana/config.hpp>
- #include <boost/hana/core/when.hpp>
- BOOST_HANA_NAMESPACE_BEGIN
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #ifdef BOOST_HANA_DOXYGEN_INVOKED
- constexpr auto if_ = [](auto&& cond, auto&& then, auto&& else_) -> decltype(auto) {
- return tag-dispatched;
- };
- #else
- template <typename L, typename = void>
- struct if_impl : if_impl<L, when<true>> { };
- struct if_t {
- template <typename Cond, typename Then, typename Else>
- constexpr decltype(auto) operator()(Cond&& cond, Then&& then, Else&& else_) const;
- };
- constexpr if_t if_{};
- #endif
- BOOST_HANA_NAMESPACE_END
- #endif
|