1 /*============================================================================= 2 Copyright (c) 2017 Paul Fultz II 3 alias.cpp 4 Distributed under the Boost Software License, Version 1.0. (See accompanying 5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 ==============================================================================*/ 7 #include <boost/hof/alias.hpp> 8 #include "test.hpp" 9 10 struct foo 11 { 12 int i; foofoo13 foo(int i_) : i(i_) 14 {} 15 }; 16 BOOST_HOF_TEST_CASE()17BOOST_HOF_TEST_CASE() 18 { 19 boost::hof::alias<int> ai = 5; 20 BOOST_HOF_TEST_CHECK(boost::hof::alias_value(ai) == 5); 21 boost::hof::alias_inherit<foo> af = foo{5}; 22 BOOST_HOF_TEST_CHECK(boost::hof::alias_value(af).i == 5); 23 } 24 25