ADC Home > Reference Library > Reference > Darwin > Miscellaneous User Space API Reference
|
stl_pair.h |
This is an internal header file, included by other library headers. You should not attempt to use it directly.
make_pair |
// _GLIBCXX_RESOLVE_LIB_DEFECTS // 181. make_pair() unintended behavior template<class _T1, class _T2> inline pair<_T1, _T2> make_pair( _T1 __x, _T2 __y)
x
y
A newly-constructed pair<> object of the appropriate type.
The standard requires that the objects be passed by reference-to-const,
but LWG issue #181 says they should be passed by const value. We follow
the LWG by default.
@brief A convenience wrapper for creating a pair from two objects.
pair |
pair() : first(), second()
The default constructor creates @c first and @c second using their * respective default constructors.
pair( __b) |
pair( const _T1& __a, const _T2& __b) : first( __a), second( __b)
Two objects may be passed to a @c pair constructor to be copied.
pair(__p .) |
template<class _U1, class _U2> pair( const pair<_U1, _U2>& __p) : first( __p.first), second( __p.second)
There is also a templated copy ctor for the @c pair class itself.
|