8 Feb 02:43
Re: template parameter for BOOST_FUSION_ADAPT_STRUCT?
Joel de Guzman <joel <at> boost-consulting.com>
2010-02-08 01:43:08 GMT
2010-02-08 01:43:08 GMT
On 2/8/2010 4:43 AM, John Wilkinson wrote:
> Hi, I have a grammer that I want to work with string or wstrings or perhaps a user
> supplied string type. I cannot see a way to get BOOST_FUSION_ADAPT_STRUCT to work with
> different sting types without defining a BOOST_FUSION_ADAPT_STRUCT for each type,
CC'ing Christopher Schmidt
This is an often requested feature that's not implemented yet.
Anyone with an itch for Boost PP hacking is welcome to hack on
it. Perhaps something like:
BOOST_FUSION_ADAPT_TPL_STRUCT(
name
((T1)(T2) ... (TN)) // template parameters
(member_type0, member_name0)
(member_type1, member_name1)
...
)
In the meantime, you can use std::pair since it has already been adapted.
Regards,
--
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net
http://www.facebook.com/djowel
Meet me at BoostCon
http://www.boostcon.com/home
http://www.facebook.com/boostcon
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
RSS Feed