1 
2 // Copyright 2018 Peter Dimov.
3 // Distributed under the Boost Software License, Version 1.0.
4 
5 #include <boost/core/typeinfo.hpp>
6 #include <boost/core/lightweight_test.hpp>
7 
8 boost::core::typeinfo const & get_typeid_int();
9 
main()10 int main()
11 {
12     boost::core::typeinfo const & ti = BOOST_CORE_TYPEID( int );
13     boost::core::typeinfo const & tf = BOOST_CORE_TYPEID( float );
14 
15     boost::core::typeinfo const & ti2 = get_typeid_int();
16 
17     BOOST_TEST( ti2 == ti );
18     BOOST_TEST( ti2 != tf );
19 
20     BOOST_TEST( !ti2.before( ti ) );
21     BOOST_TEST( !ti.before( ti2 ) );
22 
23     BOOST_TEST( ti2.before( tf ) != tf.before( ti2 ) );
24 
25     return boost::report_errors();
26 }
27