]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/type_traits/doc/declval.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / type_traits / doc / declval.qbk
CommitLineData
7c673cae
FG
1[/
2 Copyright 2015 Peter Dimov.
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:declval declval]
9
10 template <class T>
11 typename add_rvalue_reference<T>::type declval() noexcept; // as unevaluated operand
12
13__std_ref C++11 20.2.4 [declval].
14
15__header ` #include <boost/type_traits/declval.hpp>` or ` #include <boost/type_traits.hpp>`
16
17The function template `declval` is used when a value of a certain type is required in
18a type computation context. For example, the type of the result of adding an `int` and
19a `float` can be obtained with the expression `decltype( declval<int>() + declval<float>() )`.
20
21[endsect]