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 xrange_t

boost::unit_test::data::monomorphic::xrange_t — Generator for the range sequences.

Synopsis

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

template<typename SampleType, typename StepType = SampleType> 
class xrange_t {
public:
  // types
  typedef SampleType sample;

  // construct/copy/destruct
  xrange_t(SampleType const &, StepType const &, data::size_t);

  // public member functions
  data::size_t capacity() const;
  SampleType next();
  void reset();
};

Description

This class implements the generator concept (see boost::unit_test::data::monomorphic::generated_by) for implementing a range like sequence of numbers.

xrange_t public construct/copy/destruct

  1. xrange_t(SampleType const & begin_, StepType const & step_, 
             data::size_t size_);

xrange_t public member functions

  1. data::size_t capacity() const;
  2. SampleType next();
  3. void reset();

PrevUpHomeNext