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 for the latest Boost documentation.
PrevUpHomeNext

Class template array

boost::unit_test::data::monomorphic::array — Dataset view of an C array.

Synopsis

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

template<typename T> 
class array : public boost::unit_test::data::monomorphic::dataset< T > {
public:
  // member classes/structs/unions

  struct iterator :
    public boost::unit_test::data::monomorphic::dataset< T >::iterator
  {
    // construct/copy/destruct
    explicit iterator(T const *, data::size_t);

    // public member functions
    virtual T const & operator*();
    virtual void operator++();
  };

  enum @3 { arity = = 1 };
  // construct/copy/destruct
  array(T const *, std::size_t);

  // public member functions
  virtual data::size_t size() const;
  virtual iter_ptr begin() const;
};

Description

array public construct/copy/destruct

  1. array(T const * arr, std::size_t size);

array public member functions

  1. virtual data::size_t size() const;
    Dataset size.
  2. virtual iter_ptr begin() const;
    Iterator to use to iterate over this dataset.

PrevUpHomeNext