Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / libstdc++-v3 / include / std / atomic
index a2f8058..813f574 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- header.
 
-// Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+// Copyright (C) 2008-2013 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
@@ -34,7 +34,7 @@
 
 #pragma GCC system_header
 
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
 # include <bits/c++0x_warning.h>
 #endif
 
@@ -152,8 +152,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   };
 
 
-  /// atomic
-  /// 29.4.3, Generic atomic type, primary class template.
+  /**
+   *  @brief Generic atomic type, primary class template.
+   *
+   *  @tparam _Tp  Type to be made atomic, must be trivally copyable.
+   */
   template<typename _Tp>
     struct atomic
     {
@@ -185,11 +188,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       bool
       is_lock_free() const noexcept
-      { return __atomic_is_lock_free(sizeof(_M_i), &_M_i); }
+      { return __atomic_is_lock_free(sizeof(_M_i), nullptr); }
 
       bool
       is_lock_free() const volatile noexcept
-      { return __atomic_is_lock_free(sizeof(_M_i), &_M_i); }
+      { return __atomic_is_lock_free(sizeof(_M_i), nullptr); }
 
       void
       store(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept