undefined reference to 'folly::threadlocal_detail::StaticMeta<void>::EntryID::kInvalid'
authorJody Ho <jodyho@fb.com>
Fri, 16 Oct 2015 01:51:01 +0000 (18:51 -0700)
committerfacebook-github-bot-9 <folly-bot@fb.com>
Fri, 16 Oct 2015 02:20:20 +0000 (19:20 -0700)
commit77a85008801bae6d8bf7767dc2b0e8542373cd4a
tree2885cf56f2dc7ef7f23054cb4057db23ff6acdb4
parentf7176051f816980a985beeb9b8a907dddd0dc0e3
undefined reference to 'folly::threadlocal_detail::StaticMeta<void>::EntryID::kInvalid'

Summary: In some cases, folly::threadlocal_detail::StaticMeta<void>::EntryID::kInvalid
is odr-used, a definition at the namespace scope is required even though it has
been initialized with a brace-or-equal initializer.

See http://en.cppreference.com/w/cpp/language/static

Reviewed By: @yfeldblum

Differential Revision: D2548668

fb-gh-sync-id: 9cd6d7b2f37d1481d1adbf4f0a2d9e66631efd15
folly/detail/ThreadLocalDetail.h
folly/test/ThreadLocalTest.cpp