This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/63717] Value-initialization performs defaut-initialization when =default is outside the class declaration


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

--- Comment #1 from Morwenn <morwenn29 at hotmail dot fr> ---
I forgot to remove the outside-class =default in the second example, it should
be:

    struct foo
    {
        unsigned value;

        foo() = default;
        foo(unsigned value):
            value(value)
        {}
    };

    int main()
    {
        foo bar{};
    }

Sorry for that.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]