reference_content.hpp
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // boost detail/reference_content.hpp header file
3 // See http://www.boost.org for updates, documentation, and revision history.
4 //-----------------------------------------------------------------------------
5 //
6 // Copyright (c) 2003
7 // Eric Friedman
8 //
9 // Distributed under the Boost Software License, Version 1.0. (See
10 // accompanying file LICENSE_1_0.txt or copy at
11 // http://www.boost.org/LICENSE_1_0.txt)
12 
13 #ifndef BOOST_DETAIL_REFERENCE_CONTENT_HPP
14 #define BOOST_DETAIL_REFERENCE_CONTENT_HPP
15 
16 #include "boost/config.hpp"
17 
18 # include "boost/mpl/bool.hpp"
20 
21 #include "boost/mpl/void.hpp"
22 
23 namespace boost {
24 
25 namespace detail {
26 
28 // (detail) class template reference_content
29 //
30 // Non-Assignable wrapper for references.
31 //
32 template <typename RefT>
34 {
35 private: // representation
36 
37  RefT content_;
38 
39 public: // structors
40 
42  {
43  }
44 
46  : content_( r )
47  {
48  }
49 
51  : content_( operand.content_ )
52  {
53  }
54 
55 private: // non-Assignable
56 
58 
59 public: // queries
60 
61  RefT get() const
62  {
63  return content_;
64  }
65 
66 };
67 
69 // (detail) metafunction make_reference_content
70 //
71 // Wraps with reference_content if specified type is reference.
72 //
73 
74 template <typename T = mpl::void_> struct make_reference_content;
75 
76 
77 template <typename T>
79 {
80  typedef T type;
81 };
82 
83 template <typename T>
85 {
87 };
88 
89 
90 template <>
92 {
93  template <typename T>
94  struct apply
96  {
97  };
98 
99  typedef mpl::void_ type;
100 };
101 
102 } // namespace detail
103 
105 // reference_content<T&> type traits specializations
106 //
107 
108 
109 template <typename T>
112  >
113  : mpl::true_
114 {
115 };
116 
117 
118 } // namespace boost
119 
120 #endif // BOOST_DETAIL_REFERENCE_CONTENT_HPP
reference_content(const reference_content &operand)
bool_< true > true_
Definition: bool_fwd.hpp:21
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
Definition: void.hpp:29
GLdouble GLdouble r
const char * detail
reference_content & operator=(const reference_content &)


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:39