Add test cases for non-constexpr compatible types.

This commit is contained in:
Damien Buhl (alias daminetreg)
2015-04-26 21:14:17 +02:00
parent 294a5ce644
commit 265de03026
3 changed files with 67 additions and 0 deletions

View File

@ -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();
}