File indexing completed on 2025-01-18 09:28:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_DETAIL_TSS_PTR_HPP
0012 #define BOOST_ASIO_DETAIL_TSS_PTR_HPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019
0020 #if !defined(BOOST_ASIO_HAS_THREADS)
0021 # include <boost/asio/detail/null_tss_ptr.hpp>
0022 #elif defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
0023 # include <boost/asio/detail/keyword_tss_ptr.hpp>
0024 #elif defined(BOOST_ASIO_WINDOWS)
0025 # include <boost/asio/detail/win_tss_ptr.hpp>
0026 #elif defined(BOOST_ASIO_HAS_PTHREADS)
0027 # include <boost/asio/detail/posix_tss_ptr.hpp>
0028 #else
0029 # error Only Windows and POSIX are supported!
0030 #endif
0031
0032 #include <boost/asio/detail/push_options.hpp>
0033
0034 namespace boost {
0035 namespace asio {
0036 namespace detail {
0037
0038 template <typename T>
0039 class tss_ptr
0040 #if !defined(BOOST_ASIO_HAS_THREADS)
0041 : public null_tss_ptr<T>
0042 #elif defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
0043 : public keyword_tss_ptr<T>
0044 #elif defined(BOOST_ASIO_WINDOWS)
0045 : public win_tss_ptr<T>
0046 #elif defined(BOOST_ASIO_HAS_PTHREADS)
0047 : public posix_tss_ptr<T>
0048 #endif
0049 {
0050 public:
0051 void operator=(T* value)
0052 {
0053 #if !defined(BOOST_ASIO_HAS_THREADS)
0054 null_tss_ptr<T>::operator=(value);
0055 #elif defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
0056 keyword_tss_ptr<T>::operator=(value);
0057 #elif defined(BOOST_ASIO_WINDOWS)
0058 win_tss_ptr<T>::operator=(value);
0059 #elif defined(BOOST_ASIO_HAS_PTHREADS)
0060 posix_tss_ptr<T>::operator=(value);
0061 #endif
0062 }
0063 };
0064
0065 }
0066 }
0067 }
0068
0069 #include <boost/asio/detail/pop_options.hpp>
0070
0071 #endif