...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::unit_test::data::make — Creates a dataset from a value, a collection or an array.
// In header: <boost/test/data/monomorphic/fwd.hpp> template<typename DataSet> BOOST_TEST_ENABLE_IF< monomorphic::is_dataset< DataSet >::value, DataSet >::type make(DataSet && ds); template<typename T> BOOST_TEST_ENABLE_IF<!is_forward_iterable< T >::value &&!monomorphic::is_dataset< T >::value &&!boost::is_array< typename boost::remove_reference< T >::type >::value, monomorphic::singleton< T > >::type make(T && v); template<typename C> BOOST_TEST_ENABLE_IF< is_forward_iterable< C >::value, monomorphic::collection< C > >::type make(C && c); template<typename T, std::size_t size> monomorphic::array< typename boost::remove_const< T >::type > make(T(&) a);
This function has several overloads:
// returns ds if ds is already a dataset template <typename DataSet> DataSet make(DataSet&& ds); // creates a singleton dataset, for non forward iterable and non dataset type T // (a C string is not considered as a sequence). template <typename T> monomorphic::singleton<T> make(T&& v); monomorphic::singleton<char*> make( char* str ); monomorphic::singleton<char const*> make( char const* str ); // creates a collection dataset, for forward iterable and non dataset type C template <typename C> monomorphic::collection<C> make(C && c); // creates an array dataset template<typename T, std::size_t size> monomorphic::array<T> make( T (&a)[size] );