...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::monomorphic::zip — Zip datasets.
// In header: <boost/test/data/monomorphic/zip.hpp> template<typename DataSet1, typename DataSet2> class zip { public: // member classes/structs/unions struct iterator { // types typedef decltype(sample_merge(*std::declval< dataset1_iter >(), *std::declval< dataset2_iter >())) iterator_sample; // public member functions explicit iterator(dataset1_iter, dataset2_iter); auto operator*() const; void operator++(); }; // public member functions zip(DataSet1 &&, DataSet2 &&); zip(zip &&); data::size_t size() const; iterator begin() const; // private member functions data::size_t zip_size() const; // public data members static const int arity; };
A zip of two datasets is a dataset whose arity is the sum of the operand datasets arity. The size is given by the function creating the instance (see operator^
on datasets).
zip
public member functionszip(DataSet1 && ds1, DataSet2 && ds2);Constructor.
The datasets are moved and not copied.
zip(zip && j);Move constructor.
data::size_t size() const;
iterator begin() const;
zip
private member functionsdata::size_t zip_size() const;Handles the sise of the resulting zipped dataset.