Realistic 3D camera system
3D camera system components
tss_ptr.hpp
Go to the documentation of this file.
1 //
2 // detail/tss_ptr.hpp
3 // ~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
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)
9 //
10 
11 #ifndef ASIO_DETAIL_TSS_PTR_HPP
12 #define ASIO_DETAIL_TSS_PTR_HPP
13 
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 
18 #include "asio/detail/config.hpp"
19 
20 #if !defined(ASIO_HAS_THREADS)
22 #elif defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION)
24 #elif defined(ASIO_WINDOWS)
26 #elif defined(ASIO_HAS_PTHREADS)
28 #else
29 # error Only Windows and POSIX are supported!
30 #endif
31 
33 
34 namespace asio {
35 namespace detail {
36 
37 template <typename T>
38 class tss_ptr
39 #if !defined(ASIO_HAS_THREADS)
40  : public null_tss_ptr<T>
41 #elif defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION)
42  : public keyword_tss_ptr<T>
43 #elif defined(ASIO_WINDOWS)
44  : public win_tss_ptr<T>
45 #elif defined(ASIO_HAS_PTHREADS)
46  : public posix_tss_ptr<T>
47 #endif
48 {
49 public:
50  void operator=(T* value)
51  {
52 #if !defined(ASIO_HAS_THREADS)
54 #elif defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION)
55  keyword_tss_ptr<T>::operator=(value);
56 #elif defined(ASIO_WINDOWS)
57  win_tss_ptr<T>::operator=(value);
58 #elif defined(ASIO_HAS_PTHREADS)
59  posix_tss_ptr<T>::operator=(value);
60 #endif
61  }
62 };
63 
64 } // namespace detail
65 } // namespace asio
66 
68 
69 #endif // ASIO_DETAIL_TSS_PTR_HPP
void operator=(T *value)
Definition: tss_ptr.hpp:50