re PR libstdc++/49894 ([C++0x] Uniform initialization in constructor)
authorJonathan Wakely <jwakely.gcc@gmail.com>
Sat, 5 Nov 2011 13:33:29 +0000 (13:33 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Sat, 5 Nov 2011 13:33:29 +0000 (13:33 +0000)
PR libstdc++/49894
PR bootstrap/50982
* include/std/mutex (once_flag): Use NSDMI.

From-SVN: r181013

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/mutex

index 470c0c1..1d9c379 100644 (file)
@@ -1,3 +1,9 @@
+2011-11-05  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       PR libstdc++/49894
+       PR bootstrap/50982
+       * include/std/mutex (once_flag): Use NSDMI.
+
 2011-11-04  Benjamin Kosnik  <bkoz@redhat.com>
 
        * scripts/run_doxygen: Fix sed quoting.
index 4d154ff..321a332 100644 (file)
@@ -760,11 +760,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
   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;