"Any" type using "Boost"
That topic is related, sort of... its the same class, but this is a different thing I'm trying to do.
I have code that technically would "work"...
The error is:
cannot specify explicit initializer for arrays
If the user tells it it is a char* instead of just a regular array, it will compile, only it isn't a character array anymore really... and I want the user to be able to choose between char[] and char*...
That won't take a string... something likeCode:holder(const ValueType & value) : held(value) {//non array (or pointer) }
won't compile, whileCode:char x[10] = "abcd"; holder y(x);
orCode:char x[10] = "abcd"; holder y((char*)x);
will.Code:char *x = "abcd"; holder y(x);
My understanding of the problem is that the fact that it is declared as
ValueType held;
in the class, and it can't figure out how to make something like
"char[20] held;"



LinkBack URL
About LinkBacks


