Stable Numerics Subroutine Library
Programming Reference Manual
Version 1.1 DD-00006-011

5.2.2 Constructors

constexpr interval() = default; 
constexpr interval(const T& a, const T& b); 
constexpr interval(const T a[2]); 
constexpr interval(const T v); 
constexpr interval(const interval<T>& o) = default; 
constexpr interval(const std::pair<T,T>& p);

These are the constructors of the interval<T> class. All constructors with the constexpr declaration specifier are implemented in inline.

interval()


Default constructor, leaves infinimum and supremum uninitialized.

interval(const interval<T>&)


Default copy constructor.

interval(const T&, const T&) and interval(const T v[2])


Assignment constructor, assigns infinimum and supremum to the first and second argument respectively.

interval(const T&)


Assignment constructor, initializes the interval as a singleton of the given value.

interval(std::pair<T,T> &)


Assignment constructor, initializes the infinimum and supremum to the first and second value of the std::pair, respectively.