Boost logo

Boost :

From: Itay Maman (itay_maman_at_[hidden])
Date: 2002-06-13 02:34:23

Andrei Alexandrescu wrote:
> "Douglas Gregor" <gregod_at_[hidden]> wrote in message
>>I just don't see any axis along which there is a significant
> variation with
>>the use of variants where we would need a nontrivial policy.
> I believe the same. The variant is quite a fundamental type with a
> small and clear set of primitive operations. In particular, those
> primitive operations ought to allow implementing higher level
> operations.
> For example, let's take various conversions. These can be nicely
> implemented through visitation. So why not focus on developing a nice
> visitation facility and then use it for all sorts of conversions?
I agree with you in thinking that visitation is more important. The idea
of having a conversion policy came to mind only *after* I added
visitation to my variant class. And - actually - these conversion
policies were (easily) implemented in terms of vistation.

My initial feeling was that variant should supply a built-in support for
cutomizing its conversion behavior, but it seems that I am the only one
who thinks so.

The bottom line is that the variant component will still be able to
deliver whatever conversion behavior its user needs. Its just a matter
of coding a concrete visitor.


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