Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2003-04-03 03:14:00

> I think you misunderstand: What I'm arguing is that the "usage case" you
> propose here is itself erroneous. This is *not* an issue of whether I can
> implement the behavior. (In fact, I need to do additional work to prohibit
> it.)
> Let me know if you still disagree.

I disagree. Let say I want to define type that will hold constant parameter
that is represented either as constant int value or constant string that
could be used to lookup the value in some kind of global table.
So what I want is

typedef boost::variant<int const,std::string const> GlobalParameter;

GlobalParameter input_socket( 12345 ); // localhost::12345
GlobalParameter output_socket( "MultiplexorSocket" );

Is there anything wrong in such design?


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