37class atomic_impl:
private atomic_base<I>
43 atomic_impl() : atomic_base<I>(), traits() {}
45 value_type add_and_fetch( D addend )
47 return traits.add_and_fetch(&this->my_value, addend);
50 value_type fetch_and_add( D addend )
52 return traits.fetch_and_add(&this->my_value, addend);
55 value_type fetch_and_increment()
57 return traits.fetch_and_increment(&this->my_value);
60 value_type fetch_and_decrement()
62 return traits.fetch_and_decrement(&this->my_value);
65 value_type fetch_and_store( value_type value )
67 return traits.fetch_and_store(&this->my_value, value);
70 bool compare_and_swap( value_type value, value_type comparand )
72 return traits.compare_and_swap(&this->my_value, value, comparand);
75 operator value_type()
const volatile
77 return traits.fetch(&this->my_value);
80 value_type& _internal_reference()
const
82 return this->my_value;
86 value_type store_with_release( value_type rhs )
88 return traits.store_with_release(&this->my_value, rhs);
92 atomic_impl<I,D,T>& operator+=( D addend )
98 atomic_impl<I,D,T>& operator-=( D addend )
102 return operator+=(D(0)-addend);
105 value_type increment()
107 return add_and_fetch(1);
110 value_type decrement()
112 return add_and_fetch(D(-1));