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++/58408] [C++11] __thread + trivially_constructible -> error


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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
If you make it constexpr, which requires you to initialize the member, then it
works:

class Test {
 public:
 constexpr Test() = default;
 Test(char *b) { }
 int i = 0;
};


Clang accepts both that and your original.


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