Boost C++ Libraries 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.

Class template collection

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


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

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

  enum @5 { arity = = 1 };

  // construct/copy/destruct
  explicit collection(C &&);
  collection(collection &&);

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


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

  1. explicit collection(C && col);
    Constructor consumed a temporary collection or stores a reference.
  2. collection(collection && c);
    Move constructor.

collection public member functions

  1. C const & col() const;
    Returns the underlying collection.
  2. data::size_t size() const;
    dataset interface
  3. iterator begin() const;