]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/doc/add_lvalue_reference.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / type_traits / doc / add_lvalue_reference.qbk
1 [/
2 Copyright 2010 John Maddock.
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt).
6 ]
7
8 [section:add_lvalue_reference add_lvalue_reference]
9
10 template <class T>
11 struct add_lvalue_reference
12 {
13 typedef __below type;
14 };
15
16 __type If `T` names an object or function type then the member typedef `type`
17 shall name `T&`; otherwise, if `T` names a type ['rvalue reference to U] then
18 the member typedef type shall name `U&`; otherwise, type shall name `T`.
19
20 __std_ref 20.7.6.2.
21
22 __header ` #include <boost/type_traits/add_lvalue_reference.hpp>` or ` #include <boost/type_traits.hpp>`
23
24 [table Examples
25
26 [ [Expression] [Result Type]]
27
28 [[`add_lvalue_reference<int>::type`][`int&`]]
29
30 [[`add_lvalue_reference<int const&>::type`] [`int const&`]]
31
32 [[`add_lvalue_reference<int*>::type`] [`int*&`]]
33
34 [[`add_lvalue_reference<int*&>::type`] [`int*&`]]
35
36 [[`add_lvalue_reference<int&&>::type`][`int&`]]
37
38 [[`add_lvalue_reference<void>::type`][`void`]]
39
40 ]
41
42 [all_compilers]
43
44 [endsect]
45