
From: "Dan McLeran" <dan.mcleran@seagate.com>
template<typename T1, typename T2> struct AdditionTypeResolver { typedef typename CheckedIntegralValue<T1::min + T2::min, T1::max + T2::max> type; };
typedef CheckedIntegralValue<int, -10, 100> Type1; typedef CheckedIntegralValue<int, -100, 20> Type2; Type1 a = -10; Type2 b = -100; AdditionTypeResolver<Type1, Type2 >::type c = a + b;
What if T1::min and T2::min, for example, have different signs?
"michael toksvig" <michaeltoksvig@yahoo.com> wrote in message news:dgcini$ble$1@sea.gmane.org... [big snip]
Please have a look at http://www.boost.org/more/discussion_policy.htm#effective, particularly the parts on overquoting and quotation style. -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;