| 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 | |
| 7 | // Contributed by Ruslan Arutyunyan |
| 8 | #ifndef BOOST_ANY_ANYS_FWD_HPP |
| 9 | #define BOOST_ANY_ANYS_FWD_HPP |
| 10 | |
| 11 | #include <boost/config.hpp> |
| 12 | #ifdef BOOST_HAS_PRAGMA_ONCE |
| 13 | # pragma once |
| 14 | #endif |
| 15 | |
| 16 | /// \file boost/any/fwd.hpp |
| 17 | /// \brief Forward declarations of Boost.Any library types. |
| 18 | |
| 19 | |
| 20 | #include <boost/config/pragma_message.hpp> |
| 21 | #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ |
| 22 | defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \ |
| 23 | defined(BOOST_NO_CXX11_CONSTEXPR) || \ |
| 24 | defined(BOOST_NO_CXX11_NULLPTR) || \ |
| 25 | defined(BOOST_NO_CXX11_NOEXCEPT) || \ |
| 26 | defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \ |
| 27 | defined(BOOST_NO_CXX11_FINAL) || \ |
| 28 | defined(BOOST_NO_CXX11_ALIGNOF) || \ |
| 29 | defined(BOOST_NO_CXX11_STATIC_ASSERT) || \ |
| 30 | defined(BOOST_NO_CXX11_SMART_PTR) || \ |
| 31 | defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) || \ |
| 32 | defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) |
| 33 | |
| 34 | BOOST_PRAGMA_MESSAGE("C++03 support is deprecated in Boost.Any 1.82 and will be removed in Boost.Any 1.84." ) |
| 35 | |
| 36 | #endif |
| 37 | |
| 38 | #include <boost/type_traits/alignment_of.hpp> |
| 39 | |
| 40 | /// @cond |
| 41 | namespace boost { |
| 42 | |
| 43 | class any; |
| 44 | |
| 45 | namespace anys { |
| 46 | |
| 47 | class unique_any; |
| 48 | |
| 49 | template<std::size_t OptimizeForSize = sizeof(void*), std::size_t OptimizeForAlignment = boost::alignment_of<void*>::value> |
| 50 | class basic_any; |
| 51 | |
| 52 | namespace detail { |
| 53 | |
| 54 | template <class T> |
| 55 | struct is_basic_any: public boost::false_type {}; |
| 56 | |
| 57 | template<std::size_t OptimizeForSize, std::size_t OptimizeForAlignment> |
| 58 | struct is_basic_any<boost::anys::basic_any<OptimizeForSize, OptimizeForAlignment> > : public boost::true_type {}; |
| 59 | |
| 60 | template <class T> |
| 61 | struct is_some_any: public is_basic_any<T> {}; |
| 62 | |
| 63 | template <> |
| 64 | struct is_some_any<boost::any>: public boost::true_type {}; |
| 65 | |
| 66 | template <> |
| 67 | struct is_some_any<boost::anys::unique_any>: public boost::true_type {}; |
| 68 | |
| 69 | } // namespace detail |
| 70 | |
| 71 | } // namespace anys |
| 72 | |
| 73 | } // namespace boost |
| 74 | /// @endcond |
| 75 | |
| 76 | #endif // #ifndef BOOST_ANY_ANYS_FWD_HPP |
| 77 | |