http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53657
Bug #: 53657
Summary: [C++11] pair(pair&&) move constructor is non-trivial
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Keywords: ABI
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
As discussed in PR 53646 the std::pair move constructor is non-trivial and so
causes an unfortunate ABI change where std::pair gets returned from functions
by invisible reference instead of in registers.
Defaulting it makes it trivial, but causes other problems:
// XXX Defaulted?!? Breaks std::map!!!
pair(pair&& __p)
noexcept(__and_<is_nothrow_move_constructible<_T1>,
is_nothrow_move_constructible<_T2>>::value)
: first(std::forward<first_type>(__p.first)),
second(std::forward<second_type>(__p.second)) { }