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



             Bug #: 55713

           Summary: std::tuple<ElementType> incorrectly is convertible to

                    "ElementType" when it is an empty class

    Classification: Unclassified

           Product: gcc

           Version: 4.7.3

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: libstdc++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: schaub.johan...@googlemail.com





This code cannot be compiled with libstdc++



struct A {};

void f(A);



struct B { B(std::tuple<A>); };

void f(B);



int main() {

  f(std::make_tuple(A()));

}



GCC shouts



  "error: 'A' is an inaccessible base of 'tuple<A>'"



Libstdc++ should not make "std::tuple<EmptyClass>" derive from the empty class

directly.

Reply via email to