|
Boost Users : |
From: Eric Niebler (eric_at_[hidden])
Date: 2007-12-08 14:07:21
AJD wrote:
>
> Thanks, this works great. The only problem is that vector<> is intended as a
> wrapper class, and I just implemented it as an array for convenience in this
> example. It could have any underlying type, not necessarily an array. Is
> there a proper way to do this without exposing vector<>'s underlying type?
I'm confused. So your vector2<> type is intended as a wrapper for any
kind of terminal, not arrays? So how is your example different than any
of the examples in proto's docs? Have you tried using proto::extends<>
(or BOOST_PROTO_EXTENDS) to extend terminal<T>::type instead of
terminal<float[3]>::type ? You'll also need to patch up your grammar to
accept any kind of terminal.
-- Eric Niebler Boost Consulting www.boost-consulting.com
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