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

             Bug #: 51805
           Summary: Invalid list-initialization accepted
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: schaub.johan...@googlemail.com


Either I'm missing something or GCC should reject this code according to
13.3.3.1p4 (the initializer-list constructor is non-viable and the copy/move
constructors would require user defined conversions respectively to accept "{1,
2, 3}"):

  struct A { A(initializer_list<int>); }; A a{{1, 2, 3}};

People were initializing their vectors using "{{1, 2, 3}}", perhaps they are
used to do such by following the analogous "array<>" initialization notion.

Reply via email to