Boost logo

Boost Users :

Subject: Re: [Boost-users] [Proto] automaitcally convert class to proto literal
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2009-01-05 03:35:52


Daniel Oberhoff a écrit :
> I might have gotten the terms wrong. But the way I got it working now is
> with using proto::lit which turns things into literals. I tried
> subclassing terminal with my array class, but that way the tree did not
> keep a reference to the array, and thus could not be evaluated as such.

Just make a array_data class that contains your data and make your user
level array class extends terminal<array_data>::type. The vec3 example
in the doc is exacly this and I used variations of this for like 4 or 5
array like DSEL since proto is available.


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