Extracts the value from a kumi::concepts::field or returns the parameter.
- Note
- If the unqualified type of input does not model kumi::concepts::field, simply forwards the parameter
- Template Parameters
-
| T | The type to extract the value from<. |
- Parameters
-
| t | A forwarding reference to the input object. |
- Returns
- A forwarded value of the unwrapped object.
Helper type
namespace kumi::result
{
}
constexpr decltype(auto) field_value_of(T &&t) noexcept
Extracts the value from a kumi::concepts::field or returns the parameter.
Definition field.hpp:220
Computes the return type of a call to kumi::field_value_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 << standard << "\n";
}
Named wrapper over a type.
Definition field.hpp:26