
12 Apr
2011
12 Apr
'11
3:15 p.m.
On 4/11/2011 7:05 PM, Tore Halvorsen wrote:
On Mon, Apr 11, 2011 at 9:18 AM, Sebastian Redl
wrote: Hi,
How would I use BOOST_FUSION_ADAPT_ADT to turn an ADT that doesn't expose setters into a read-only sequence? In other words, what do I pass as set_exprN if there is no valid set expression?
Just pass it nothing.
e.g.
BOOST_FUSION_ADAPT_ADT( name, (std::string const&, std::string const&, obj.get(), ) ;
That's a good workaround, but really, we ought to have read-only adaptors. Doing above would still allow elem = val; albeit will be a no-op. Please add a trac "feature request" ticket, if you will. Regards, -- Joel de Guzman http://www.boostpro.com http://boost-spirit.com