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 init_list

boost::unit_test::data::monomorphic::init_list — Dataset view from an initializer_list or variadic template arguments.

Synopsis

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

template<typename T> 
class init_list {
public:
  // types
  typedef std::vector< T >::const_iterator iterator;

  // public member functions
  init_list(std::initializer_list< T >);
  template<class ... Args> init_list(Args &&...);
  data::size_t size() const;
  iterator begin() const;

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

Description

The data should be stored in the dataset, and since the elements are passed by an std::initializer_list , it implies a copy of the elements.

init_list public member functions

  1. init_list(std::initializer_list< T > il);
    Constructor copies content of initializer_list.
  2. template<class ... Args> init_list(Args &&... args);
    Variadic template initialization.
  3. data::size_t size() const;
    dataset interface
  4. iterator begin() const;

Specializations


PrevUpHomeNext