diff --git a/test/Jamfile b/test/Jamfile index 1c84637d..73c4e89a 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -150,6 +150,7 @@ project [ run sequence/define_tpl_struct.cpp : : : : ] [ run sequence/define_tpl_struct_inline.cpp : : : : ] [ run sequence/define_assoc_tpl_struct.cpp : : : : ] + [ run sequence/std_tuple.cpp : : : : ] [ run sequence/std_tuple_iterator.cpp : : : : ] [ run sequence/ref_vector.cpp : : : : ] [ run sequence/flatten_view.cpp : : : : ] diff --git a/test/sequence/std_tuple.cpp b/test/sequence/std_tuple.cpp new file mode 100644 index 00000000..3ac6e387 --- /dev/null +++ b/test/sequence/std_tuple.cpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2014 Kohei Takahashi + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#include + +#if !defined(BOOST_NO_CXX11_HDR_TUPLE) + +#include +#include +#include +#include +#include +#include +#include + +int +main() +{ + using namespace boost::fusion; + using namespace boost; + +// The convert only supports implementations using variadic templates +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + { + // conversion vector to std tuple + std::tuple t = convert(make_vector(123, "Hola!!!")); + BOOST_TEST(std::get<0>(t) == 123); + BOOST_TEST(std::get<1>(t) == "Hola!!!"); + } +#endif + + return boost::report_errors(); +} + +#else + +int +main() +{ + return 0; +} + +#endif