
25 Jan
2010
25 Jan
'10
4:16 p.m.
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