...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; // construct/copy/destruct explicit iterator(dataset1_iter, dataset2_iter); // public member functions auto operator *() const; void operator++(); }; enum @12 { arity = = dataset1_decay::arity + dataset2_decay::arity }; // construct/copy/destruct zip(DataSet1 &&, DataSet2 &&); zip(zip &&); // public member functions data::size_t size() const; iterator begin() const; // private member functions data::size_t zip_size() const; };
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
construct/copy/destructzip(DataSet1 && ds1, DataSet2 && ds2);Constructor.
The datasets are moved and not copied.
zip(zip && j);Move constructor.
zip
private member functionsdata::size_t zip_size() const;Handles the sise of the resulting zipped dataset.