[Bug libstdc++/51183] New: pair piecewise_construct_t constructor copies

marc.glisse at normalesup dot org gcc-bugzilla@gcc.gnu.org
Thu Nov 17 02:34:00 GMT 2011


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: unassigned@gcc.gnu.org
        ReportedBy: marc.glisse@normalesup.org


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.



More information about the Gcc-bugs mailing list