// -*- 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
#pragma GCC system_header
-#ifndef __GXX_EXPERIMENTAL_CXX0X__
+#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#endif
};
- /// 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
{
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