Boost logo

Boost Users :

From: Joel de Guzman (joel_at_[hidden])
Date: 2007-07-26 11:10:03


Jeff Flinn wrote:
> Graham Reitz wrote:

> I've also used tie to get the best of both worlds:
>

Yep. The disadvantage though is the one-reference-per-member that
tie gives you. This is not quite optimal. With ties, you pass the
whole structure with references around, instead of a single reference
to the struct. With fusion, you can use the BOOST_FUSION_ADAPT_STRUCT
macro I mentioned to make any struct a full fledged fusion container.
Then you can pass the struct directly to any fusion algorithm, etc.
This is how fusion adapts std::pair now.

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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