
28 Sep
2010
28 Sep
'10
4:03 p.m.
On 28/09/10 16:21, Jeremiah Willcock wrote:
The issue is that convertability constraints are too easy to get wrong (within algorithms); see p. 8 of N1758 that was linked to before. You can write them without is_convertible (as they were done before). Using is_same<decltype(...), ...> is fine, but that might cause trouble for users since now they can't return proxies (or even references) as their function results. A pseudosignature-based approach allows conversions both on the user side and the algorithm side without any of the gyrations and subtlety that shows up with valid expressions.
Just write it with a temporary variable (named or not) and avoid all the problems.