A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/declval below:

23 General utilities library [utilities]

23 General utilities library [utilities] 23.2 Utility components [utility] 23.2.7 Function template declval [declval]

The library provides the function template declval to simplify the definition of expressions which occur as unevaluated operands.

template <class T> add_rvalue_reference_t<T> declval() noexcept;

Remarks: If this function is odr-used, the program is ill-formed.

Remarks: The template parameter T of declval may be an incomplete type.

[Example:

template <class To, class From> decltype(static_cast<To>(declval<From>())) convert(From&&);

declares a function template convert which only participates in overloading if the type From can be explicitly converted to type To. For another example see class template common_­type ([meta.trans.other]). end example]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4