Boost logo

Boost :

Subject: Re: [boost] [guidelines] why template errors suck
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-09-28 12:03:40


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk