File indexing completed on 2026-08-17 08:38:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef BOOST_ATOMIC_WAIT_RESULT_HPP_INCLUDED_
0015 #define BOOST_ATOMIC_WAIT_RESULT_HPP_INCLUDED_
0016
0017 #include <type_traits>
0018 #include <boost/atomic/detail/config.hpp>
0019 #include <boost/atomic/detail/header.hpp>
0020
0021 #ifdef BOOST_HAS_PRAGMA_ONCE
0022 #pragma once
0023 #endif
0024
0025 namespace boost {
0026 namespace atomics {
0027
0028
0029 template< typename T >
0030 struct wait_result
0031 {
0032
0033 T value;
0034
0035 bool timeout;
0036
0037 constexpr wait_result() noexcept(std::is_nothrow_default_constructible< T >::value) :
0038 value(),
0039 timeout(false)
0040 {
0041 }
0042
0043 template< typename U, typename = typename std::enable_if< std::is_constructible< T, U&& >::value >::type >
0044 constexpr wait_result(U&& val, bool tout) noexcept(std::is_nothrow_constructible< T, U&& >::value) :
0045 value(static_cast< U&& >(val)),
0046 timeout(tout)
0047 {
0048 }
0049 };
0050
0051 }
0052 }
0053
0054 #include <boost/atomic/detail/footer.hpp>
0055
0056 #endif