Re: [Boost-bugs] [Boost C++ Libraries] #8011: iterator_range::size() is not SFINAE-friendly

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8011: iterator_range::size() is not SFINAE-friendly
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-11 23:48:46


#8011: iterator_range::size() is not SFINAE-friendly
---------------------------------------------------------+------------------
  Reporter: Jonathan Wakely <jwakely.boost@…> | Owner: neilgroves
      Type: Feature Requests | Status: new
 Milestone: To Be Determined | Component: range
   Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------------------------------+------------------

Comment (by nathanridge):

 Replying to [ticket:8011 Jonathan Wakely <jwakely.boost@…>]:
> iterator_range<I>::size() is always defined, but fails a static
 assertion if I is not a random access iterator. This means it's not
 possible to use SFINAE To detect whether r.size() is valid.

 What is a use case to using SFINAE to detect whether r.size() is valid?
 (I'm not questioning that there is one, I'm just curious.)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8011#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC