From 00de8a24dd5845fcaa430315db6efd95d670d476 Mon Sep 17 00:00:00 2001 From: paolo Date: Tue, 7 Sep 2010 14:05:23 +0000 Subject: 2010-09-07 Paolo Carlini PR libstdc++/45398 * include/std/atomic (atomic<_TP*>::store): Define. * include/std/atomic (atomic<_TP*>::load, exchange): Define inline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163950 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/include/std/atomic | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'libstdc++-v3/include/std') diff --git a/libstdc++-v3/include/std/atomic b/libstdc++-v3/include/std/atomic index d4f685ced54..c94597db6f3 100644 --- a/libstdc++-v3/include/std/atomic +++ b/libstdc++-v3/include/std/atomic @@ -141,13 +141,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) atomic(_Tp* __v) : atomic_address(__v) { } void - store(_Tp*, memory_order = memory_order_seq_cst); + store(_Tp* __v, memory_order __m = memory_order_seq_cst) + { atomic_address::store(__v, __m); } _Tp* - load(memory_order = memory_order_seq_cst) const; + load(memory_order __m = memory_order_seq_cst) const + { return static_cast<_Tp*>(atomic_address::load(__m)); } _Tp* - exchange(_Tp*, memory_order = memory_order_seq_cst); + exchange(_Tp* __v, memory_order __m = memory_order_seq_cst) + { return static_cast<_Tp*>(atomic_address::exchange(__v, __m)); } bool compare_exchange_weak(_Tp*&, _Tp*, memory_order, memory_order); @@ -487,17 +490,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) using __base_type::operator=; }; - - template - _Tp* - atomic<_Tp*>::load(memory_order __m) const - { return static_cast<_Tp*>(atomic_address::load(__m)); } - - template - _Tp* - atomic<_Tp*>::exchange(_Tp* __v, memory_order __m) - { return static_cast<_Tp*>(atomic_address::exchange(__v, __m)); } - template bool atomic<_Tp*>::compare_exchange_weak(_Tp*& __r, _Tp* __v, memory_order __m1, -- cgit v1.2.1