#include
#include
#include <boost/fusion/adapted/struct/adapt_struct.hpp>
#include
#include
struct Person {
std::string name;
int age;
};
BOOST_FUSION_ADAPT_STRUCT(
Person,
(std::string, name)
(int, age)
)
int main() {
Person person = {“Alice”, 30};
std::cout << "Original Person: " << boost::fusion::as_vector(person) << std::endl;
// Modify the Person using Fusion
boost::fusion::at_c<0>(person) = "Bob";
boost::fusion::at_c<1>(person) = 25;
std::cout << "Modified Person: " << boost::fusion::as_vector(person) << std::endl;
return 0;
}