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

Class template grid

boost::unit_test::data::monomorphic::grid — Implements the dataset resulting from a cartesian product/grid operation on datasets.

Synopsis

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

template<typename DataSet1, typename DataSet2> 
class grid {
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 const &);
    auto operator*() const;
    void operator++();
  };

  // public member functions
  grid(DataSet1 &&, DataSet2 &&);
  grid(grid &&);
  data::size_t size() const;
  iterator begin() const;

  // public data members
  static const int arity;
};

Description

The arity of the resulting dataset is the sum of the arity of its operands.

grid public member functions

  1. grid(DataSet1 && ds1, DataSet2 && ds2);
    Constructor.
  2. grid(grid && j);
    Move constructor.
  3. data::size_t size() const;
  4. iterator begin() const;

PrevUpHomeNext