http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51183
Bug #: 51183
Summary: pair piecewise_construct_t constructor copies
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: [email protected]
ReportedBy: [email protected]
Hello,
on clc++, someone noticed that the technique used by libstdc++ for pair's
piecewise_construct_t constructor calls a (elided) copy constructor. In
particular:
#include <utility>
#include <tuple>
struct A {
A();
A(A const&)=delete;
};
int main(){
std::pair<A,int> p { std::piecewise_construct_t(), std::make_tuple(),
std::make_tuple(1) };
}
is rejected by the compiler.