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

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;

  // public member functions
  delayed_dataset(Args...);
  delayed_dataset(delayed_dataset &&);
  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;

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

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 member functions

  1. delayed_dataset(Args... args);
  2. delayed_dataset(delayed_dataset && b);
  3. boost::unit_test::data::size_t size() const;
  4. 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