Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2001-09-22 11:23:57


I thought of these a while ago. I don't know if I'm ever going to do
something with these ideas, but maybe one of you can take these.

1. Some types in Boost items involve a std::pair with both template
parameters the same type. We could compact this somehow. Too bad we can't
do:

    template < typename T >
    typedef std::pair<T,T> doublet;

I guess we have to make a class template that inherits from std::pair and/or
uses special conversions.

2. If we have [1], we should have a make_doublet function template that
works like std::make_pair.

3. Should we have a pair_switch function template, that takes a
std::pair<X,Y> and returns a std::pair<Y,X> that is the input in the reverse
order? (X and Y can be the same type. If [1] is done, we could have a
doublet_switch too.)

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com

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