Creates a field from a given value keeping the qualifiers.
- Template Parameters
-
| Name | The label to associate to the field. |
- Parameters
-
| t | A forwarding reference to the input object. |
- Returns
- A field that correctly keeps the qualified input type.
Helper type
namespace kumi::result
{
}
decltype(auto) constexpr capture_field(T &&t) noexcept
Definition field.hpp:253
Computes the return type of a call to kumi::capture_field
Example:
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
using namespace kumi::literals;
int field = { 1 };
std::cout <<
field <<
"\n";
}
Named wrapper over a type.
Definition field.hpp:26