- In the C++
programming language,
decltype is a
keyword used to
query the type of an expression.
Introduced in C++11, its
primary intended use is in generic...
- //
decltype(x3a) is int
decltype(i) x3d = i; //
decltype(x3d) is int auto x4a = (i); //
decltype(x4a) is int
decltype((i)) x4d = (i); //
decltype(x4d)...
-
operator name
unless the type is
inferred (e.g.
operator auto(),
operator decltype(auto)() etc.). The type name can also be
inferred (e.g new auto) if an...
- int
decltype(c) e; // e has type int, the type of the
entity named by c
decltype((c)) f = c; // f has type int&,
because (c) is an
lvalue decltype(0) g;...
- function's
return type
would use the two
formal parameter names with
decltype:
decltype(lhs + rhs). But,
where a
return type is
traditionally specified, those...
- type int& RRI&& r5 = 5; // r5 has the type int&&
decltype(r2)& r6 = i; // r6 has the type int&
decltype(r2)&& r7 = i; // r7 has the type int& A non-static...
-
decltype([]( void *h ) { h && h !=
INVALID_HANDLE_VALUE && CloseHandle( (HANDLE)h ); })>;
using XHMODULE = unique_ptr<remove_reference_t<
decltype(*HMODULE())>...
-
static constexpr bool
is_leaf = true;
decltype(auto) operator[](size_t i)
const {
return elems[i]; }
decltype(auto) &operator[](size_t i) {
return elems[i];...
-
mainly consists of six
compiler features: lambdas,
rvalue references, auto,
decltype, static_****ert, and nullptr. C++11 also
supports library features (e.g...
- Yes Yes No No C++ (same as C) (same as C plus)
typeid new
delete throw decltype static_cast dynamic cast
reinterpret_cast const_cast Yes Yes Yes Yes Yes...