|
Boost Users : |
Subject: Re: [Boost-users] Variant pointer and bool
From: Philipp Hamann (philipp.hamann_at_[hidden])
Date: 2010-12-14 08:10:30
Hi,
thank you both for your quick and good help. It is working now for me, too.
I am sorry. I was wrong. I was not very correct using const. This caused
the problem, but not boost::variant. I thougt the void pointer was the
problem, since I had a similar problem with strings.
Sorry for bothering you.
Philipp
Am 13.12.2010 21:45, schrieb Larry Evans:
> On 12/13/10 12:35, Steven Watanabe wrote:
>> AMDG
>>
>> On 12/13/2010 8:02 AM, Philipp Hamann wrote:
> [snip]
>>> boost::variant<void*, bool, int, std::string> value;
>>> void* p;
>>> value = p;
>>> bool b = boost::get<bool>(value); //OK
>>> void* p2 = boost::get<void*>(value); //Error
>>
>> It works fine for me with the current trunk. What version
>> of Boost are you using and what compiler?
>>
>
> Works for me too. Apparently changes to boost::vartiant were made
> after the reference I provided in my reply.
>
> The code used to test it is attached after doing `svn update`
> which gave output:
>
> Updated to revision 67223.
>
> Sorry for noise of my other post.
>
> -Larry
>
>
>
>
> _______________________________________________
> 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