Consider:

   struct S {
   private:
     S(const S&); // no copy-c'tor
   };

   S && ref();

   void f(S);

   void g() {
     f(ref());
   }

This compiles using

   g++ -c -std=c++0x test.cpp

where in fact the compiler should complain about the copy-c'tor not being
public.


-- 
           Summary: [c++0x] rvalue reference & copy construction issue
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: s dot gesemann at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39050

Reply via email to