| 1 | // |
| 2 | // Copyright 2012-2024 Antony Polukhin. |
| 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 | #define TEST_LIB_SOURCE |
| 10 | #include "test_lib.hpp" |
| 11 | |
| 12 | namespace user_defined_namespace { |
| 13 | class user_defined{}; |
| 14 | } |
| 15 | |
| 16 | namespace test_lib { |
| 17 | |
| 18 | boost::typeindex::type_index get_integer() { |
| 19 | return boost::typeindex::type_id<int>(); |
| 20 | } |
| 21 | |
| 22 | boost::typeindex::type_index get_user_defined_class() { |
| 23 | return boost::typeindex::type_id<user_defined_namespace::user_defined>(); |
| 24 | } |
| 25 | |
| 26 | boost::typeindex::type_index get_const_integer() { |
| 27 | return boost::typeindex::type_id_with_cvr<const int>(); |
| 28 | } |
| 29 | |
| 30 | boost::typeindex::type_index get_const_user_defined_class() { |
| 31 | return boost::typeindex::type_id_with_cvr<const user_defined_namespace::user_defined>(); |
| 32 | } |
| 33 | |
| 34 | #if !defined(BOOST_HAS_PRAGMA_DETECT_MISMATCH) || !defined(_CPPRTTI) |
| 35 | // Just do nothing |
| 36 | void accept_typeindex(const boost::typeindex::type_index&) {} |
| 37 | #endif |
| 38 | |
| 39 | } |
| 40 | |
| 41 | |