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 a snapshot of the master branch, built from commit e20847db8d.
PrevUpHomeNext

Class template delayed_dataset

boost::unit_test::data::monomorphic::delayed_dataset — Delayed dataset.

Synopsis

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

template<typename dataset_t, class ... Args> 
class delayed_dataset {
public:
  // types
  typedef decltype(std::declval< dataset_t >().begin()) iterator;

  enum @3 { arity = = dataset_t::arity };

  // construct/copy/destruct
  delayed_dataset(Args...);
  delayed_dataset(delayed_dataset &&);

  // public member functions
  boost::unit_test::data::size_t size() const;
  iterator begin() const;

  // private member functions
  dataset_t & get() const;
  template<std::size_t... I> 
    std::unique_ptr< dataset_t > 
    create(boost::unit_test::data::index_sequence< I... >) const;
};

Description

This dataset holds another dataset that is instanciated on demand. It is constructed with the data::make_delayed<dataset_t>(arg1,....) instead of the data::make.

delayed_dataset public construct/copy/destruct

  1. delayed_dataset(Args... args);
  2. delayed_dataset(delayed_dataset && b);

delayed_dataset public member functions

  1. boost::unit_test::data::size_t size() const;
  2. iterator begin() const;

delayed_dataset private member functions

  1. dataset_t & get() const;
  2. template<std::size_t... I> 
      std::unique_ptr< dataset_t > 
      create(boost::unit_test::data::index_sequence< I... >) const;

PrevUpHomeNext