Stable Numerics Subroutine Library
Programming Reference Manual
Version 1.2 DD-00006-012

9.2.2 Constructors

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

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

pair()


Default constructor, leaves all values uninitialized.

pair(const pair<T>&)


Default copy constructor.

pair(const T&, const T&) and pair(const T a[2])


Assignment constructor, assigns main value and remainder value, respectively.

pair(const T&)


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

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


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