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 11:36:03

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

> What is the correct way of getting several character arrays into a variant:
> // This doesn't work
> typedef boost::variant<int,char[256],char[8192]> MyType;

> Thanks,
> Michael Goldshteyn


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> >?


Boost list run by bdawes at, gregod at, cpdaniel at, john at