Boost logo

Boost Users :

Subject: Re: [Boost-users] [Fusion] Adapting read-only fields of ADTs
From: Joel de Guzman (joel_at_[hidden])
Date: 2011-04-12 11:15:41

On 4/11/2011 7:05 PM, Tore Halvorsen wrote:
> On Mon, Apr 11, 2011 at 9:18 AM, Sebastian Redl
> <sebastian.redl_at_[hidden]> 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.
> 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.


Joel de Guzman

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at