Graham Reitz wrote:
Yes, thanks Joel.
I should have used more elements in my example and not called it some_pair.
Oh and BTW, in case you don't know yet, in Fusion, structs and tuples
are interchangeable. IOTW, structs *are* tuples. Sample:
namespace ns
{
struct point
{
int x;
int y;
};
}
BOOST_FUSION_ADAPT_STRUCT(
ns::point,
(int, x)
(int, y)
)
/*...*/
ns::point p = {123, 456};
std::cout << at_c<0>(p) << std::endl;
std::cout << at_c<1>(p) << std::endl;
(those at_c<N> thingies are Fusion's get<N> counterparts. Ala MPL!)
It's the same interface as say, for vector