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 singleton

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

Synopsis

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

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

  struct iterator {

    // public member functions
    explicit iterator(singleton< T > const *);
    sample const & operator*() const;
    void operator++();
  };

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

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

Description

singleton public member functions

  1. explicit singleton(T && value);
    Constructor.
  2. singleton(singleton && s);
    Move constructor.
  3. T const & value() const;
    Value access method.
  4. data::size_t size() const;
    dataset interface
  5. iterator begin() const;

PrevUpHomeNext