123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265 |
- #ifndef BOOST_TYPE_INDEX_HPP
- #define BOOST_TYPE_INDEX_HPP
- #include <boost/config.hpp>
- #ifdef BOOST_HAS_PRAGMA_ONCE
- # pragma once
- #endif
- #if defined(BOOST_TYPE_INDEX_USER_TYPEINDEX)
- # include BOOST_TYPE_INDEX_USER_TYPEINDEX
- # ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
- # pragma detect_mismatch( "boost__type_index__abi", "user defined type_index class is used: " BOOST_STRINGIZE(BOOST_TYPE_INDEX_USER_TYPEINDEX))
- # endif
- #elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
- # include <boost/type_index/stl_type_index.hpp>
- # if defined(BOOST_NO_RTTI) || defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)
- # include <boost/type_index/detail/stl_register_class.hpp>
- # ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
- # pragma detect_mismatch( "boost__type_index__abi", "RTTI is off - typeid() is used only for templates")
- # endif
- # else
- # ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
- # pragma detect_mismatch( "boost__type_index__abi", "RTTI is used")
- # endif
- # endif
- #else
- # include <boost/type_index/ctti_type_index.hpp>
- # include <boost/type_index/detail/ctti_register_class.hpp>
- # ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
- # pragma detect_mismatch( "boost__type_index__abi", "RTTI is off - using CTTI")
- # endif
- #endif
- #ifndef BOOST_TYPE_INDEX_REGISTER_CLASS
- #define BOOST_TYPE_INDEX_REGISTER_CLASS
- #endif
- namespace boost { namespace typeindex {
- #if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
- #define BOOST_TYPE_INDEX_FUNCTION_SIGNATURE BOOST_CURRENT_FUNCTION
- #define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING (0, 0, false, "")
-
-
-
-
-
-
-
- typedef platform_specific type_index;
- #elif defined(BOOST_TYPE_INDEX_USER_TYPEINDEX)
-
- #elif (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
- typedef boost::typeindex::stl_type_index type_index;
- #else
- typedef boost::typeindex::ctti_type_index type_index;
- #endif
- typedef type_index::type_info_t type_info;
- #if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
- #define BOOST_TYPE_INDEX_USER_TYPEINDEX <full/absolute/path/to/header/with/type_index.hpp>
- #define BOOST_TYPE_INDEX_REGISTER_CLASS nothing-or-some-virtual-functions
- #define BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
- #endif
- template <class T>
- inline type_index type_id() noexcept {
- return type_index::type_id<T>();
- }
- template <class T>
- inline type_index type_id_with_cvr() noexcept {
- return type_index::type_id_with_cvr<T>();
- }
- template <class T>
- inline type_index type_id_runtime(const T& runtime_val) noexcept {
- return type_index::type_id_runtime(runtime_val);
- }
- }}
- #endif
|