struct B {
B () {}
B(int i) {}
};
struct D : B {
using B::B;
D(const char* p) {}
};
int main () {
D d1; // ok
D d2(3); // ok
D d3("hello"); // ok
}
c3RydWN0IEIgeyAKICBCICgpIHt9CiAgQihpbnQgaSkge30KfTsKCnN0cnVjdCBEIDogQiB7IAogIHVzaW5nIEI6OkI7CiAgRChjb25zdCBjaGFyKiBwKSB7fQp9OwoKaW50IG1haW4gKCkgewogIEQgZDE7IC8vIG9rCiAgRCBkMigzKTsgLy8gb2sKICBEIGQzKCJoZWxsbyIpOyAgLy8gb2sKfQo=
prog.cpp:7:12: error: ‘B::B’ names constructor
prog.cpp: In function ‘int main()’:
prog.cpp:12:5: error: no matching function for call to ‘D::D()’
prog.cpp:12:5: note: candidates are:
prog.cpp:8:3: note: D::D(const char*)
prog.cpp:8:3: note: candidate expects 1 argument, 0 provided
prog.cpp:6:8: note: constexpr D::D(const D&)
prog.cpp:6:8: note: candidate expects 1 argument, 0 provided
prog.cpp:6:8: note: constexpr D::D(D&&)
prog.cpp:6:8: note: candidate expects 1 argument, 0 provided
prog.cpp:13:9: error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]
prog.cpp:8:3: error: initializing argument 1 of ‘D::D(const char*)’ [-fpermissive]