union.hpp 852 B

1234567891011121314151617181920212223242526272829303132
  1. /*!
  2. @file
  3. Forward declares `boost::hana::union_`.
  4. Copyright Louis Dionne 2013-2022
  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_FWD_UNION_HPP
  9. #define BOOST_HANA_FWD_UNION_HPP
  10. #include <boost/hana/config.hpp>
  11. #include <boost/hana/core/when.hpp>
  12. namespace boost { namespace hana {
  13. // Note: This function is documented per datatype/concept only.
  14. //! @cond
  15. template <typename T, typename = void>
  16. struct union_impl : union_impl<T, when<true>> { };
  17. //! @endcond
  18. struct union_t {
  19. template <typename Xs, typename Ys>
  20. constexpr auto operator()(Xs&&, Ys&&) const;
  21. };
  22. BOOST_HANA_INLINE_VARIABLE constexpr union_t union_{};
  23. }} // end namespace boost::hana
  24. #endif // !BOOST_HANA_FWD_UNION_HPP