|
Boost Users : |
Subject: [Boost-users] [Fusion] Assignement from adapted struct to tuple
From: Samuel Debionne (debionne_at_[hidden])
Date: 2011-03-29 09:50:35
Hello all,
While I managed to assign an adapted structure to a fusion vector, I
fail to assign the same structure to a legacy tuple. The doc doesn't
mention the assignement operator between two sequences, but I though it
would work. Am I missing something ?
#include <boost/fusion/include/vector.hpp>
#include <boost/fusion/include/adapt_struct.hpp>
#include <boost/fusion/include/boost_tuple.hpp>
struct my_struct {
double a;
int b;
char c;
};
BOOST_FUSION_ADAPT_STRUCT(
my_struct,
(double, a)
(int, b)
(char, c));
my_struct src;
boost::fusion::vector<double, int, char> dest1 = src; //OK
boost::tuple<double, int, char> dest2 = src; //Fails
Samuel
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net