Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2003-04-04 04:08:46


"Peter Dimov" <pdimov_at_[hidden]> wrote in message
news:005301c2f9c6$82a3aa00$1d00a8c0_at_pdimov2...
> Gennadiy Rozental wrote:
> > So what I want is
> >
> > typedef boost::variant<int const,std::string const> GlobalParameter;
> >
> > GlobalParameter input_socket( 12345 ); // localhost::12345
> > GlobalParameter output_socket( "MultiplexorSocket" );
>
> typedef boost::variant<int, std::string> GlobalParameter;
>
> GlobalParameter const input_socket( 12345 ); // localhost::12345
> GlobalParameter const output_socket( "MultiplexorSocket" );
>
> Same as vector<int const> vs vector<int> const.

    What if variant is the member of the class template, and we want to
support const type arguments? Why not implement const support if it does not
cost us too much and you agree that there exist possible usage cases?
    But I feel more relaxed on this point now. Though I believe if variant
will end up without const type support it should be clearly documented that
there is a way to implement variant constants in many cases.

Gennadiy.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk