|
Boost : |
From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2006-12-27 07:51:46
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk