Boost logo

Boost :

Subject: Re: [boost] Range-aware version of min and max
From: Neil Groves (neil_at_[hidden])
Date: 2010-01-25 11:16:30


>
>
> namespace boost {
>
> template<class A, class B>
> struct min_result
> template<class A, class B>
> struct max_result
>
> I'm sure there's some implementation details I haven't considered, but is
> there any fundamental reason why an approach like this would be flawed or
> undesirable?
>
>
I think the idea of the return types is more general than just for
min_result and max_result. I would prefer to see a type generator for type
promotion and demotion.
This is generally useful in other scenarios such as matrix return types etc.

May I suggest promote_type<A,B> and demote_type<A,B> as the names for the
appropriate type generators?

> Zach
>

Neil Groves


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