Boost logo

Boost Users :

Subject: Re: [Boost-users] boost any questions and praise
From: Alan Tennant (alan2here_at_[hidden])
Date: 2010-02-01 19:39:27


Thanks :¬)

I can't test it until tomorrow but it looks great. This appears to take
boost::any closer to boost::variant.

<< support is most useful. I presume they still cast back to the original
object in the same way that boost::any does and any non standard object they
contain that will work in a stream will now work inside the boost::any.

Is this going to be an official update or just a branch for me.

Can I get a mention for inspiring the idea?

Whats the empty struct for in main?

Thanks for the info about Variant being faster. Especially with this new
change it looks as if boost::any and boost::variant can be interchanged
quite easily.

On 1 February 2010 21:10, Peter Foelsche <foelsche_at_[hidden]> wrote:

> see attached
>
> Peter
>
> "Alan Tennant" <alan2here_at_[hidden]> wrote in message
> news:a557f5fb1001301059h1dfc32davd917a47d8c598a05_at_mail.gmail.com...
> Firstly. Thank you very much team Boost, it looks like it will be very
> useful and solve many of my coding problems.
>
> I can create an any
> boost::any a1;
>
> I can assign something to it
> a1 = string1;
>
> I can get it back out later
> std::cout<<any_cast<std::string>(a1);
>
> A boost any has a "type()" method.
>
> However this produced an error.
>
> std::cout<<any_cast<a1.type()>(a1);
>
> ------------------------------
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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