Home | Libraries | People | FAQ | More |
pfr::tie_from_structure — std::tie-like function that allows assigning to tied values from aggregates.
// In header: <pfr/core.hpp> template<typename... Elements> unspecified tie_from_structure(Elements &... args);
Example:
auto f() { struct { struct { int x, y } p; short s; } res { { 4, 5 }, 6 }; return res; } auto [p, s] = f(); pfr::tie_from_structure(p, s) = f();
Returns: |
an object with lvalue references to |