Commit 80572dcc authored by Alexander Batashev's avatar Alexander Batashev Committed by Facebook GitHub Bot

Fix static_assert for C++20 (#1628)

Summary:
This is a follow-up on https://github.com/facebook/folly/issues/1594

Pull Request resolved: https://github.com/facebook/folly/pull/1628

Differential Revision: D30179861

Pulled By: yfeldblum

fbshipit-source-id: 8949cd95e089a14f0ee63b784cecebe93c473607
parent 2f05671b
......@@ -259,7 +259,9 @@ struct AccessSpreader : private detail::AccessSpreaderBase {
private:
struct GlobalState : detail::AccessSpreaderBase::GlobalState {};
static_assert(
std::is_trivial<GlobalState>::value || kCpplibVer, "not trivial");
is_constexpr_default_constructible_v<GlobalState> &&
std::is_trivially_destructible<GlobalState>::value,
"unsuitable for global state");
public:
FOLLY_EXPORT static GlobalState& state() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment