Provide copy constructor and copy assignment operators for C++11.
Clang implements the C++11 semantics properly that require the default to be implicitly deleted.
This commit is contained in:
parent
418a93cd57
commit
6677762418
|
@ -107,6 +107,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
pair(_U1&& __x, _U2&& __y)
|
||||
: first(std::forward<_U1>(__x)),
|
||||
second(std::forward<_U2>(__y)) { }
|
||||
|
||||
pair(const pair &) = default;
|
||||
pair(pair &&) = default;
|
||||
#endif
|
||||
|
||||
/** There is also a templated copy ctor for the @c pair class itself. */
|
||||
|
@ -121,6 +124,14 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
: first(std::forward<_U1>(__p.first)),
|
||||
second(std::forward<_U2>(__p.second)) { }
|
||||
|
||||
pair&
|
||||
operator=(const pair& __p)
|
||||
{
|
||||
first = __p.first;
|
||||
second = __p.second;
|
||||
return *this;
|
||||
}
|
||||
|
||||
pair&
|
||||
operator=(pair&& __p)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue