fwd.hpp 1004 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright Antony Polukhin, 2021-2023.
  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. #include <boost/type_traits/alignment_of.hpp>
  14. namespace boost {
  15. class any;
  16. namespace anys {
  17. template<std::size_t OptimizeForSize = sizeof(void*), std::size_t OptimizeForAlignment = boost::alignment_of<void*>::value>
  18. class basic_any;
  19. namespace detail {
  20. template <class T>
  21. struct is_basic_any: public false_type {};
  22. template<std::size_t OptimizeForSize, std::size_t OptimizeForAlignment>
  23. struct is_basic_any<boost::anys::basic_any<OptimizeForSize, OptimizeForAlignment> > : public true_type {};
  24. } // namespace detail
  25. } // namespace anys
  26. } // namespace boost
  27. #endif // #ifndef BOOST_ANY_ANYS_FWD_HPP