]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_index/test/ctti_print_name.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / type_index / test / ctti_print_name.cpp
1 //
2 // Copyright Antony Polukhin, 2012-2015.
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See
5 // accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7
8 #include <iostream>
9
10 // This cpp file:
11 // * tests BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING macro
12 // * outputs full ctti name so that TypeIndex library could be adjust to new compiler without requesting regression tester's help
13 #define BOOST_TYPE_INDEX_CTTI_USER_DEFINED_PARSING (0,0,false,"")
14 #include <boost/type_index/ctti_type_index.hpp>
15
16 namespace user_defined_namespace {
17 class user_defined_class {};
18 }
19
20 int main()
21 {
22 using namespace boost::typeindex;
23
24 std::cout << "int: "
25 << ctti_type_index::type_id<int>() << '\n';
26
27 std::cout << "double: "
28 << ctti_type_index::type_id<double>() << '\n';
29
30 std::cout << "user_defined_namespace::user_defined_class: "
31 << ctti_type_index::type_id<user_defined_namespace::user_defined_class>() << '\n';
32
33
34 return 0;
35 }
36