mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-15 21:32:22 +02:00
@ -29,6 +29,7 @@ main()
|
||||
using namespace boost::fusion;
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
namespace fusion = boost::fusion;
|
||||
using boost::fusion::pair;
|
||||
using boost::fusion::make_pair;
|
||||
|
||||
@ -61,15 +62,15 @@ main()
|
||||
BOOST_STATIC_ASSERT((!result_of::has_key<set_type, double>::value));
|
||||
|
||||
std::cout << deref_data(begin(m)) << std::endl;
|
||||
std::cout << deref_data(next(begin(m))) << std::endl;
|
||||
std::cout << deref_data(fusion::next(begin(m))) << std::endl;
|
||||
|
||||
BOOST_TEST(deref_data(begin(m)) == 123);
|
||||
BOOST_TEST(deref_data(next(begin(m))) == "Hola");
|
||||
BOOST_TEST(deref_data(fusion::next(begin(m))) == "Hola");
|
||||
|
||||
BOOST_STATIC_ASSERT((is_same<result_of::key_of<result_of::begin<set_type>::type>::type, int>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<result_of::key_of<result_of::next<result_of::begin<set_type>::type>::type>::type, std::string>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<result_of::value_of_data<result_of::begin<set_type>::type>::type, int>::value));
|
||||
BOOST_STATIC_ASSERT((is_same<result_of::value_of_data<result_of::next<result_of::begin<set_type>::type>::type>::type, std::string>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<result_of::key_of<result_of::begin<set_type>::type>::type, int>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<result_of::key_of<result_of::next<result_of::begin<set_type>::type>::type>::type, std::string>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<result_of::value_of_data<result_of::begin<set_type>::type>::type, int>::value));
|
||||
BOOST_STATIC_ASSERT((boost::is_same<result_of::value_of_data<result_of::next<result_of::begin<set_type>::type>::type>::type, std::string>::value));
|
||||
}
|
||||
|
||||
{
|
||||
|
Reference in New Issue
Block a user