1 2 // Copyright Sergey Krivonos 2017 3 // 4 // Distributed under the Boost Software License, Version 1.0. 5 // (See accompanying file LICENSE_1_0.txt or copy at 6 // http://www.boost.org/LICENSE_1_0.txt) 7 // 8 // See http://www.boost.org/libs/mpl for documentation. 9 10 // $Id$ 11 // $Date$ 12 // $Revision$ 13 14 15 #include <boost/mpl/get_tag.hpp> 16 #include <boost/mpl/aux_/test.hpp> 17 #include <boost/mpl/aux_/test/assert.hpp> 18 #include <boost/type_traits/is_same.hpp> 19 20 21 struct test_type_get_tag_def 22 { 23 typedef int a_tag; 24 }; 25 26 BOOST_MPL_GET_TAG_DEF(a_tag); 27 MPL_TEST_CASE()28MPL_TEST_CASE() 29 { 30 MPL_ASSERT(( is_same<int, boost::mpl::get_a_tag<test_type_get_tag_def>::type> )); 31 MPL_ASSERT(( is_same<test_type_get_tag_def::a_tag, boost::mpl::get_a_tag<test_type_get_tag_def>::type> )); 32 } 33