Boost logo

Boost Users :

From: Bruno Martínez Aguerre (br1_at_[hidden])
Date: 2005-02-04 14:16:56


On Thu, 03 Feb 2005 00:33:37 +0200, Yuval Ronen <ronen_yuval_at_[hidden]>
wrote:

> Eric Friedman wrote:
>> Hi,
>> I can imagine cases where the current behavior might be preferable
>> (e.g., uses of variant types in generic contexts). But I think for the
>> vast majority of cases, and especially in non-generic contexts,
>> checking the type as you propose is a good idea.
>> I will determine a way to work this into the library, either by
>> modifying the semantics of boost::get or by introducing a new accessor
>> function. Thanks for the input.
>> Eric Friedman
>> Co-author of Variant library
>
> Great! Thanks a lot.
>
> BTW, another two small remarks: The "variant::types" typedef that was
> used here is not documented, and it will be helpful if I could read
> about it and about its possible usages. And if you wish not to burden
> the users with mpl, then it's possible to wrap mpl::contains in a
> constant boolean value "can_be", as I suggested.

variant::types is documented here:
http://boost.org/doc/html/boost/variant.html

Bruno


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