Boost logo

Boost Users :

Subject: Re: [Boost-users] [Fusion] Adapting read-only fields of ADTs
From: Tore Halvorsen (tore.halvorsen_at_[hidden])
Date: 2011-04-11 07:05:16


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.

BOOST_FUSION_ADAPT_ADT(
    name,
    (std::string const&, std::string const&, obj.get(), )
;

-- 
Eld på åren og sol på eng gjer mannen fegen og fjåg. [Jøtul]
<demo> 2011 Tore Halvorsen || +052 0553034554

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