std::meta::dealias
Defined in header <meta> | ||
|---|---|---|
consteval std::meta::info dealias( std::meta::info r ); | (since C++26) |
If r represents a type alias or a namespace alias, returns a reflection that represents the aliased type or namespace; otherwise, returns r.
Parameters
| r | - | a reflection value |
Return value
A reflection value representing the entity that r aliases, or r if it's not an alias.
Example
#include <meta>
#include <string>
#include <type_traits>
static_assert(^^std::string != ^^std::basic_string<char>);
static_assert(std::meta::dealias(^^std::string) == ^^std::basic_string<char>);
static_assert(^^std::void_t<int> != ^^void);
static_assert(std::meta::dealias(^^std::void_t<int>) == ^^void);
static_assert(std::meta::dealias(^^std::void_t) == ^^std::void_t);
int main() {}
See also
|
(C++26) | checks if reflection represents a type alias (function) |
|
(C++26) | checks if reflection represents a namespace alias (function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/meta/dealias