Also use NSDMI for std::once_flag
PR libstdc++/49894
PR bootstrap/50982
* include/std/mutex (once_flag): Use NSDMI.
tested x86_64-linux, committed to trunk.
Index: include/std/mutex
===================================================================
--- include/std/mutex (revision 180749)
+++ include/std/mutex (working copy)
@@ -760,11 +760,11 @@
{
private:
typedef __gthread_once_t __native_type;
- __native_type _M_once;
+ __native_type _M_once = __GTHREAD_ONCE_INIT;
public:
/// Constructor
- constexpr once_flag() noexcept : _M_once(__GTHREAD_ONCE_INIT) { }
+ constexpr once_flag() noexcept = default;
/// Deleted copy constructor
once_flag(const once_flag&) = delete;