- 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)...
- 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...
- 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...
- 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;...
-
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];...
-
Alignof since C++11 alignof(R) or _Alignof(R) No Yes —
Decltype since C++11
decltype (a)
decltype (R) No No — Type
identification typeid(a) typeid(R) No...
-
decltype([]( void *h ) { h && h !=
INVALID_HANDLE_VALUE && CloseHandle( (HANDLE)h ); })>;
using XHMODULE = unique_ptr<remove_reference_t<
decltype(*HMODULE())>...
- Yes Yes Yes Yes Yes Yes No No C++ (more)
sizeof typeid new
delete throw decltype static_cast dynamic cast
reinterpret_cast const_cast Yes Yes Yes Yes Yes...
-
mainly consists of six
compiler features: lambdas,
rvalue references, auto,
decltype, static_****ert, and nullptr. C++11 also
supports library features (e.g...