fwd.hpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Copyright Antony Polukhin, 2021-2024.
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See
  4. // accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. // Contributed by Ruslan Arutyunyan
  7. #ifndef BOOST_ANY_ANYS_FWD_HPP
  8. #define BOOST_ANY_ANYS_FWD_HPP
  9. #include <boost/config.hpp>
  10. #ifdef BOOST_HAS_PRAGMA_ONCE
  11. # pragma once
  12. #endif
  13. /// \file boost/any/fwd.hpp
  14. /// \brief Forward declarations of Boost.Any library types.
  15. /// @cond
  16. namespace boost {
  17. class any;
  18. namespace anys {
  19. class unique_any;
  20. template<std::size_t OptimizeForSize = sizeof(void*), std::size_t OptimizeForAlignment = alignof(void*)>
  21. class basic_any;
  22. namespace detail {
  23. template <class T>
  24. struct is_basic_any: public std::false_type {};
  25. template<std::size_t OptimizeForSize, std::size_t OptimizeForAlignment>
  26. struct is_basic_any<boost::anys::basic_any<OptimizeForSize, OptimizeForAlignment> > : public std::true_type {};
  27. template <class T>
  28. struct is_some_any: public is_basic_any<T> {};
  29. template <>
  30. struct is_some_any<boost::any>: public std::true_type {};
  31. template <>
  32. struct is_some_any<boost::anys::unique_any>: public std::true_type {};
  33. } // namespace detail
  34. } // namespace anys
  35. } // namespace boost
  36. /// @endcond
  37. #endif // #ifndef BOOST_ANY_ANYS_FWD_HPP