Boost logo

Boost :

Subject: Re: [boost] Holding char arrays in boost variants, what is the correct way?
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2011-06-14 12:04:16


2011/6/14 Michael Goldshteyn <mgoldshteyn_at_[hidden]>

>
> "Krzysztof Czainski" wrote in message
> news:BANLkTi=5=Cww4Y9zT1WGQj4Tgzb9tGAd8g_at_mail.gmail.com...
>
>>
>> Hi,
>> I don't have an answer to your question, but I have two aside questions:
>> 1) Why didn't you try variant<int,char[MAX_LEN]> in the first place? (I
>> don't know if it should work or not)
>> 2) Why not variant<int,vector<char> >?
>>
>
> 1) doesn't work
> 2) is an idea, but I was hoping to avoid dynamic allocation in cases where
> I know the max size
>
> Michael Goldshteyn
>
> Have you looked at boost::array?

Kris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk