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 collection

boost::unit_test::data::monomorphic::collection — Dataset from a forward iterable container (collection)

Synopsis

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

template<typename C> 
class collection {
public:
  // types
  typedef col_type::value_type     sample;  
  typedef col_type::const_iterator iterator;

  // public member functions
  explicit collection(C &&);
  collection(collection &&);
  C const & col() const;
  data::size_t size() const;
  iterator begin() const;

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

Description

This dataset is applicable to any container implementing a forward iterator. Note that container with one element will be considered as singletons. This dataset is constructible with the boost::unit_test::data::make function.

collection public member functions

  1. explicit collection(C && col);
    Constructor consumed a temporary collection or stores a reference.
  2. collection(collection && c);
    Move constructor.
  3. C const & col() const;
    Returns the underlying collection.
  4. data::size_t size() const;
    dataset interface
  5. iterator begin() const;

PrevUpHomeNext