stubs/mutex: Fix compilation by initializing variable in WrappedMutex class.

This solves the following error in gcc:
explicitly defaulted function cannot be declared 'constexpr' because the implicit declaration is not 'constexpr'
This commit is contained in:
Biswapriyo Nath 2020-11-28 14:38:21 +05:30 committed by Adam Cozzette
parent 9ee163a5d7
commit 5cc03457e6

View File

@ -125,11 +125,11 @@ class GOOGLE_PROTOBUF_CAPABILITY("mutex") PROTOBUF_EXPORT WrappedMutex {
private:
#if defined(GOOGLE_PROTOBUF_SUPPORT_WINDOWS_XP)
CallOnceInitializedMutex<CriticalSectionLock> mu_;
CallOnceInitializedMutex<CriticalSectionLock> mu_ {};
#elif defined(_MSC_VER)
CallOnceInitializedMutex<std::mutex> mu_;
CallOnceInitializedMutex<std::mutex> mu_ {};
#else
std::mutex mu_;
std::mutex mu_ {};
#endif
};