Extracts the identifier of a kumi::concepts::field, or returns kumi::unknown.
More...
Extracts the identifier of a kumi::concepts::field, or returns kumi::unknown.
◆ identifier_of()
template<typename T>
| auto kumi::identifier_of |
( |
| ) |
|
|
inlinenodiscardconstevalnoexcept |
- Note
- If the unqualified type of input does not model kumi::concepts::field, returns kumi::unknown.
- Template Parameters
-
| T | The type to extract the identifier from. |
- Returns
- The identifier of the field or kumi::unknown.
Helper type
namespace kumi::result
{
}
consteval auto identifier_of() noexcept
Definition field.hpp:178
Computes the return type of a call to kumi::identifier_of
Example:
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
using namespace kumi::literals;
auto field = (
"x"_id = 1 );
int standard = { 12 };
std::cout <<
field <<
"\n";
std::cout << kumi::identifier_of<decltype(field)>() << "\n";
std::cout << standard << "\n";
std::cout << kumi::identifier_of<decltype(standard)>() << "\n";
}
Named wrapper over a type.
Definition field.hpp:26