Boost C++ Libraries 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.

Class template open_interval



// In header: <boost/icl/open_interval.hpp>

template<typename DomainT, 
         ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT)> 
class open_interval {
  // types
  typedef open_interval< DomainT, Compare > type;       
  typedef DomainT                           domain_type;

  // construct/copy/destruct
  explicit open_interval(const DomainT &);
  open_interval(const DomainT &, const DomainT &);

  // public member functions
  DomainT lower() const;
  DomainT upper() const;


open_interval public construct/copy/destruct

  1. open_interval();

    Default constructor; yields an empty interval (0,0).

  2. explicit open_interval(const DomainT & val);

    Constructor for an open singleton interval (val-1,val+1)

  3. open_interval(const DomainT & low, const DomainT & up);

    Interval from low to up with bounds bounds

open_interval public member functions

  1. DomainT lower() const;
  2. DomainT upper() const;