-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
Why not make it possible to adapt structures in an alternative way (not only through BOOST_FUSION_ADAPT_STRUCT)? For example, like this:
namespace demo
{
struct employee
{
std::string name;
int age;
};
}
// demo::employee is now a Fusion sequence
namespace boost { namespace fusion {
namespace adapted {
constexpr auto tie_members(const demo::employee& x) noexcept {
return std::tie(x.name, x.age);
}
}
}}
or, like this:
namespace demo
{
struct employee
{
std::string name;
int age;
constexpr auto tie_members() const noexcept {
return std::tie(name, age);
}
};
}
Does this fit into the Boost Fusion library? Does it make sense to create a PR? Even if no one uses this feature, it will somehow reduce the amount of code in #243, and possibly speed up its review.
Metadata
Metadata
Assignees
Labels
No labels