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 for the latest Boost documentation.
PrevUpHomeNext

Class template zip

boost::unit_test::data::monomorphic::zip — Zip datasets.

Synopsis

// 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 @11 { 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;
};

Description

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/destruct

  1. zip(DataSet1 && ds1, DataSet2 && ds2);
    Constructor.

    The datasets are moved and not copied.

  2. zip(zip && j);
    Move constructor.

zip public member functions

  1. data::size_t size() const;
  2. iterator begin() const;

zip private member functions

  1. data::size_t zip_size() const;
    Handles the sise of the resulting zipped dataset.

PrevUpHomeNext