From patchwork Sat Nov 5 12:59:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v3] use NSDMI in C++11 mutex types Date: Sat, 05 Nov 2011 02:59:36 -0000 From: Jonathan Wakely X-Patchwork-Id: 123838 Message-Id: To: "libstdc++" , gcc-patches 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;