
27 Dec
2006
27 Dec
'06
12:51 p.m.
Hi Doug and Boost community, I noticed that the Boost implementation of result_of uses inheritance to forward the type member of a nested result metafunction, so that result_of<...>::type can result in a substitution failure (and not an error when used in an appropriate context) if the nested result class template does not have a type member. It's surely a nice feature (also because it usually stops trace diagnostics at a reasonable point in case of an error). Should the standard text perhaps encforce that kind of implementation - e.g: [tr.func.ret.ret] 2 5 (b) If N>0, result_of<F(T1, T2, ... TN)> inherits from F::result<F(T1, T2, ... TN)> ? Comments? Regards, Tobias