]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/type_index/detail/stl_register_class.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / type_index / detail / stl_register_class.hpp
CommitLineData
7c673cae 1//
92f5a8d4 2// Copyright (c) 2013-2019 Antony Polukhin.
7c673cae
FG
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_STL_REGISTER_CLASS_HPP
10#define BOOST_TYPE_INDEX_STL_REGISTER_CLASS_HPP
11
12/// \file stl_register_class.hpp
13/// \brief Contains BOOST_TYPE_INDEX_REGISTER_CLASS macro implementation that uses boost::typeindex::stl_type_index.
14/// Not intended for inclusion from user's code.
15
16#include <boost/type_index/stl_type_index.hpp>
17
18#ifdef BOOST_HAS_PRAGMA_ONCE
19# pragma once
20#endif
21
22namespace boost { namespace typeindex { namespace detail {
23
24template <class T>
25inline const stl_type_index::type_info_t& stl_construct_typeid_ref(const T*) BOOST_NOEXCEPT {
26 return typeid(T);
27}
28
29}}} // namespace boost::typeindex::detail
30
31/// @cond
32#define BOOST_TYPE_INDEX_REGISTER_CLASS \
33 virtual const boost::typeindex::stl_type_index::type_info_t& boost_type_index_type_id_runtime_() const BOOST_NOEXCEPT { \
34 return boost::typeindex::detail::stl_construct_typeid_ref(this); \
35 } \
36/**/
37/// @endcond
38
39#endif // BOOST_TYPE_INDEX_STL_REGISTER_CLASS_HPP
40