Fixed C++11 implementation of map's result_of::deref_data to return a

reference as expected.
This commit is contained in:
Joel de Guzman
2014-11-18 23:11:13 +08:00
parent 68b4683e95
commit 0f34b3a692
3 changed files with 18 additions and 8 deletions

View File

@ -139,6 +139,15 @@ main()
pair<int, copy_all> p1;
pair<int, copy_all> p2 = p1;
}
{
// compile test only
// make sure result_of::deref_data returns a reference
typedef map<pair<float, int> > map_type;
typedef boost::fusion::result_of::begin<map_type>::type i_type;
typedef boost::fusion::result_of::deref_data<i_type>::type r_type;
BOOST_STATIC_ASSERT((boost::is_same<r_type, int&>::value));
}
return boost::report_errors();
}