Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Function template make

boost::unit_test::data::make — Creates a dataset from a value, a collection or an array.

Synopsis

// In header: <boost/test/data/monomorphic/fwd.hpp>


template<typename DataSet> 
  std::enable_if< monomorphic::is_dataset< DataSet >::value, DataSet >::type 
  make(DataSet && ds);

Description

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] );


PrevUpHomeNext