This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58408] [C++11] __thread + trivially_constructible -> error
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Sep 2013 11:12:39 +0000
- Subject: [Bug c++/58408] [C++11] __thread + trivially_constructible -> error
- Auto-submitted: auto-generated
- References: <bug-58408-4 at http dot gcc dot gnu dot org/bugzilla/>
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.