Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/smart_ptr/detail/atomic_count_nt.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author | Chris Cannam |
---|---|
date | Tue, 30 Jul 2019 12:25:44 +0100 |
parents | f46d142149f5 |
children |
rev | line source |
---|---|
Chris@102 | 1 #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_NT_HPP_INCLUDED |
Chris@102 | 2 #define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_NT_HPP_INCLUDED |
Chris@102 | 3 |
Chris@102 | 4 // |
Chris@102 | 5 // boost/detail/atomic_count_nt.hpp |
Chris@102 | 6 // |
Chris@102 | 7 // Trivial atomic_count for the single-threaded case |
Chris@102 | 8 // |
Chris@102 | 9 // http://gcc.gnu.org/onlinedocs/porting/Thread-safety.html |
Chris@102 | 10 // |
Chris@102 | 11 // Copyright 2013 Peter Dimov |
Chris@102 | 12 // |
Chris@102 | 13 // Distributed under the Boost Software License, Version 1.0. |
Chris@102 | 14 // See accompanying file LICENSE_1_0.txt or copy at |
Chris@102 | 15 // http://www.boost.org/LICENSE_1_0.txt |
Chris@102 | 16 // |
Chris@102 | 17 |
Chris@102 | 18 namespace boost |
Chris@102 | 19 { |
Chris@102 | 20 |
Chris@102 | 21 namespace detail |
Chris@102 | 22 { |
Chris@102 | 23 |
Chris@102 | 24 class atomic_count |
Chris@102 | 25 { |
Chris@102 | 26 public: |
Chris@102 | 27 |
Chris@102 | 28 explicit atomic_count( long v ): value_( v ) |
Chris@102 | 29 { |
Chris@102 | 30 } |
Chris@102 | 31 |
Chris@102 | 32 long operator++() |
Chris@102 | 33 { |
Chris@102 | 34 return ++value_; |
Chris@102 | 35 } |
Chris@102 | 36 |
Chris@102 | 37 long operator--() |
Chris@102 | 38 { |
Chris@102 | 39 return --value_; |
Chris@102 | 40 } |
Chris@102 | 41 |
Chris@102 | 42 operator long() const |
Chris@102 | 43 { |
Chris@102 | 44 return value_; |
Chris@102 | 45 } |
Chris@102 | 46 |
Chris@102 | 47 private: |
Chris@102 | 48 |
Chris@102 | 49 atomic_count(atomic_count const &); |
Chris@102 | 50 atomic_count & operator=(atomic_count const &); |
Chris@102 | 51 |
Chris@102 | 52 long value_; |
Chris@102 | 53 }; |
Chris@102 | 54 |
Chris@102 | 55 } // namespace detail |
Chris@102 | 56 |
Chris@102 | 57 } // namespace boost |
Chris@102 | 58 |
Chris@102 | 59 #endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_NT_HPP_INCLUDED |