|
Boost Users : |
From: Jiri Palecek (jpalecek_at_[hidden])
Date: 2008-03-28 10:48:49
On Mon, 17 Mar 2008 20:05:58 -0000, Daniel Oberhoff
<daniel_at_[hidden]> wrote:
> Hi,
>
> I am playing with boost::variant to introduce a more elegant property
> system into my current project. I was wondering why there are no cast
> operatorst defined for the variant types, to avoid having to type get<>:
>
> boost::variant<double,int,string> v;
> string s = v;
>
> is there a basic reason why this is not possible?
I guess it's because it's pretty dangerous to do implicit casts that may
fail.
Regards
Jiri Palecek
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