Boost logo

Boost :

Subject: Re: [boost] [range] [general] making member functions SFINAE-friendly
From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2013-02-19 13:23:58


On 19 February 2013 18:18, Pyry Jahkola wrote:
> On 2013-02-19 17:01:14 +0000, Jonathan Wakely said:
>
>> On 19 February 2013 17:00, Thorsten Ottosen wrote:
>>>
>>>
>>> Would using enable_if on size() not solve the problem?
>>
>>
>> It's not a template function, so you can't.
>
>
> I'm not suggesting to actually use the following hack in
> boost::iterator_range, but since you claimed the opposite, this trick has
> the wished SFINAE behavior in C++11.

Yes, "can't" was too strong. "Can't without changing the signature and
making it even uglier than most SFINAE tricks" would have been more
accurate!


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