]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/type_index/detail/ctti_register_class.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / type_index / detail / ctti_register_class.hpp
1 //
2 // Copyright (c) Antony Polukhin, 2013-2014.
3 //
4 //
5 // Distributed under the Boost Software License, Version 1.0. (See accompanying
6 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 //
8
9 #ifndef BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP
10 #define BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP
11
12 /// \file ctti_register_class.hpp
13 /// \brief Contains BOOST_TYPE_INDEX_REGISTER_CLASS macro implementation that uses boost::typeindex::ctti_type_index.
14 /// Not intended for inclusion from user's code.
15
16 #include <boost/type_index/ctti_type_index.hpp>
17
18 #ifdef BOOST_HAS_PRAGMA_ONCE
19 # pragma once
20 #endif
21
22 namespace boost { namespace typeindex { namespace detail {
23
24 template <class T>
25 inline const ctti_data& ctti_construct_typeid_ref(const T*) BOOST_NOEXCEPT {
26 return ctti_construct<T>();
27 }
28
29 }}} // namespace boost::typeindex::detail
30
31 /// @cond
32 #define BOOST_TYPE_INDEX_REGISTER_CLASS \
33 virtual const boost::typeindex::detail::ctti_data& boost_type_index_type_id_runtime_() const BOOST_NOEXCEPT { \
34 return boost::typeindex::detail::ctti_construct_typeid_ref(this); \
35 } \
36 /**/
37 /// @endcond
38
39 #endif // BOOST_TYPE_INDEX_CTTI_REGISTER_CLASS_HPP
40