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 singleton

boost::unit_test::data::monomorphic::singleton — Models a single element data set.


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

template<typename T> 
class singleton {
  // member classes/structs/unions

  struct iterator {
    // construct/copy/destruct
    explicit iterator(singleton< T > const *);

    // public member functions
    sample const  & operator *() const;
    void operator++();

  enum @11 { arity = = 1 };
  // construct/copy/destruct
  explicit singleton(T &&);
  singleton(singleton &&);

  // public member functions
  T const  & value() const;
  data::size_t size() const;
  iterator begin() const;


singleton public construct/copy/destruct

  1. explicit singleton(T && value);
  2. singleton(singleton && s);
    Move constructor.

singleton public member functions

  1. T const  & value() const;
    Value access method.
  2. data::size_t size() const;
    dataset interface
  3. iterator begin() const;