5 // Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11 #ifndef BOOST_ASIO_DETAIL_TSS_PTR_HPP
12 #define BOOST_ASIO_DETAIL_TSS_PTR_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #include <boost/asio/detail/config.hpp>
20 #if !defined(BOOST_ASIO_HAS_THREADS)
21 # include <boost/asio/detail/null_tss_ptr.hpp>
22 #elif defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
23 # include <boost/asio/detail/keyword_tss_ptr.hpp>
24 #elif defined(BOOST_ASIO_WINDOWS)
25 # include <boost/asio/detail/win_tss_ptr.hpp>
26 #elif defined(BOOST_ASIO_HAS_PTHREADS)
27 # include <boost/asio/detail/posix_tss_ptr.hpp>
29 # error Only Windows and POSIX are supported!
32 #include <boost/asio/detail/push_options.hpp>
40 #if !defined(BOOST_ASIO_HAS_THREADS)
41 : public null_tss_ptr<T>
42 #elif defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
43 : public keyword_tss_ptr<T>
44 #elif defined(BOOST_ASIO_WINDOWS)
45 : public win_tss_ptr<T>
46 #elif defined(BOOST_ASIO_HAS_PTHREADS)
47 : public posix_tss_ptr<T>
51 void operator=(T* value)
53 #if !defined(BOOST_ASIO_HAS_THREADS)
54 null_tss_ptr<T>::operator=(value);
55 #elif defined(BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION)
56 keyword_tss_ptr<T>::operator=(value);
57 #elif defined(BOOST_ASIO_WINDOWS)
58 win_tss_ptr<T>::operator=(value);
59 #elif defined(BOOST_ASIO_HAS_PTHREADS)
60 posix_tss_ptr<T>::operator=(value);
69 #include <boost/asio/detail/pop_options.hpp>
71 #endif // BOOST_ASIO_DETAIL_TSS_PTR_HPP