blob: 7b151aed64bdb55f455f1ee69f2cfe5958b5c609 [file] [log] [blame]
[/
Copyright 2015 Peter Dimov.
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
]
[section:declval declval]
template <class T>
typename add_rvalue_reference<T>::type declval() noexcept; // as unevaluated operand
__std_ref C++11 20.2.4 [declval].
__header ` #include <boost/type_traits/declval.hpp>` or ` #include <boost/type_traits.hpp>`
The function template `declval` is used when a value of a certain type is required in
a type computation context. For example, the type of the result of adding an `int` and
a `float` can be obtained with the expression `decltype( declval<int>() + declval<float>() )`.
[endsect]