https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78073

            Bug ID: 78073
           Summary: inherited initializer_list constructor is not
                    accessible
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ryan.burn at gmail dot com
  Target Milestone: ---

The below code should compile but gives this error with g++ built from trunk
(20161022).

main.cpp: In function ‘int main()’:
main.cpp:12:13: error: could not convert ‘2.0e+0’ from ‘double’ to ‘A’
   B b = {2.0};
             ^


////////////////////////////////////////////////////////////////////////////
#include <initializer_list>

struct A {
  A(std::initializer_list<double>) {}
};

struct B : A {
  using A::A;
};

int main() {
  B b = {2.0};
  return 0;
}
////////////////////////////////////////////////////////////////////////////

Reply via email to