Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-11-03 18:42:33

Eric Friedman <ebf_at_[hidden]> writes:

> No offense, but I believe it is a *terrible* idea for any type to have
> the dual meanings of 'type sequence' and 'value type'. I've raised
> this before; see
> As always, please feel to tell me if/why I'm wrong.

I understand your argument, but I'm uneasy about the idea that certain
Concepts are ineligible for multiple-refinement. IOW: why are type
sequences special? They *can* be passed by value (at least all of the
one's I've seen can). It's not unusual to have values that convey
nothing other than type info (see the std iterator tags). I see no
reason you shouldn't be able to make a variant containing an mpl type

My feeling is that the most-principled (if not most-convenient)
design for variant would change the current usage



   variant<variant_types<some-mpl-type-sequence> >

and leave


for the case where you actually want an instance of
some-mpl-type-sequence in the variant.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at