forked from boostorg/fusion
Add test cases for non-constexpr compatible types.
This commit is contained in:
@ -26,6 +26,14 @@ BOOST_FUSION_DEFINE_STRUCT(
|
||||
|
||||
BOOST_FUSION_DEFINE_STRUCT(BOOST_PP_EMPTY(), s, (int, m))
|
||||
|
||||
// Testing non-constexpr compatible types
|
||||
BOOST_FUSION_DEFINE_STRUCT(
|
||||
(ns),
|
||||
employee,
|
||||
(std::string, name)
|
||||
(std::string, nickname)
|
||||
)
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
@ -100,6 +108,14 @@ main()
|
||||
BOOST_TEST(p == make_vector(3,5));
|
||||
}
|
||||
|
||||
{
|
||||
ns::employee emp = make_list("John Doe", "jdoe");
|
||||
std::cout << at_c<0>(emp) << std::endl;
|
||||
std::cout << at_c<1>(emp) << std::endl;
|
||||
|
||||
BOOST_TEST(emp == make_vector("John Doe", "jdoe"));
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user