
8 Dec
2009
8 Dec
'09
4:54 p.m.
AMDG Frédéric Bron wrote:
Would this also allow a user to override this behavior when they want to ensure an exact type match?
From earlier discussion, we conclude it was not possible to check for an exact return type, only convertible to is achievable.
It is (almost) possible to check the exact return type. template<class Expected, class Actual> boost::is_same<Expected, Actual> test(const Actual&); Note that this doesn't handle references correctly. In Christ, Steven Watanabe