
16 May
2008
16 May
'08
8:34 a.m.
currently I get a compiler error if I try to pass a string literal to a boost::any.
I guess the same happens if you pass an array.
Formally speaking, arrays don't satisfy ValueType requirements because they are not CopyConstructible. Pointers are normally not ValueTypes either (because you can't copy them freely, you have to remember of a scope of an object they point to). So, it's good that your code doesn't compile. If you intend to pass an array use boost::arrary, otherwise cast explicitly. http://www.boost.org/doc/libs/1_35_0/doc/html/any/reference.html#any.ValueTy... -- Alexander