Gennadiy Rozental wrote:
I argue that top-level const type arguments are meaningless in the
context
of variant. Given the example you provide:
typedef boost::variantint const, std::string const GlobalParameter;
GlobalParameter input_socket(12345);
input_socket = 54321; // no
Gennadiy Rozental wrote:
So what I want is
typedef boost::variantint const,std::string const GlobalParameter;
GlobalParameter input_socket( 12345 ); // localhost::12345
GlobalParameter output_socket( MultiplexorSocket );
[snip]
What if variant is the member of the class
I argue that top-level const type arguments are meaningless in the context
of variant. Given the example you provide:
typedef boost::variantint const, std::string const GlobalParameter;
GlobalParameter input_socket(12345);
input_socket = 54321; // no way to prevent this!!
How come!?