[Bug c++/78124] [7 regression][c++1z] explicit inheriting constructor is ignored

lucdanton at free dot fr gcc-bugzilla@gcc.gnu.org
Wed Nov 16 08:03:00 GMT 2016


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

--- Comment #2 from lucdanton at free dot fr ---
I ran into a different program that regressed starting at r241187 (again, only
for -std=c++1z), this time not involving explicit constructors:

//----------
struct aggr {
    int x;
};

struct base {
    base(aggr) {}
};

struct derived: base {
    using base::base;
};

base fine() { return { { 0 } }; }
// error: could not convert '{{0}}' from '<brace-enclosed initializer list>' to
'derived'
derived uhoh() { return { { 0 } }; }

int main()
{
}


More information about the Gcc-bugs mailing list