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 DS1, typename DS2> 
class grid {
public:
  // member classes/structs/unions

  struct iterator :
    public boost::unit_test::data::monomorphic::dataset< T >::iterator
  {
    // types
    typedef monomorphic::traits< T >::ref_type ref_type;

    // construct/copy/destruct
    explicit iterator(ds1_iter_ptr, DS2 const &);

    // public member functions
    virtual ref_type operator*();
    virtual void operator++();
  };

  enum @6 { 
            arity = = boost::decay<DS1>::type::arity + boost::decay<DS2>::type::arity };
  // construct/copy/destruct
  grid(DS1 &&, DS2 &&);
  grid(grid &&);

  // public member functions
  virtual data::size_t size() const;
  virtual iter_ptr begin() const;
};

Description

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

grid public construct/copy/destruct

  1. grid(DS1 && ds1, DS2 && ds2);
    Constructor.
  2. grid(grid && j);
    Move constructor.

grid public member functions

  1. virtual data::size_t size() const;
    Dataset size.
  2. virtual iter_ptr begin() const;
    Iterator to use to iterate over this dataset.

PrevUpHomeNext