Skip to content
Snippets Groups Projects
Commit a6527917 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

Merge branch 'feature/improve-is_range' into 'master'

Improve is_range

This avoids the `sizeof` hack in favour of a more idiomatic version
and also implements checks for all needed expressions:
* existenz of r.begin()
* existenz of r.end()
* inequality comparison of iterator and end-iterator
* end-iterator converts to iterator (dropped in C++17)
* prefix increment of iterator
* dereference of iterator
   
In order to avoid a "computed value not used warning" we
add an additional call to a dummy function.
    
In fact this check is not complete, because it only accepts
member begin() and end(). Adding support for std:: and adl-version
would require a more complicated helper and thus better be placed
in a real concept definition.

See merge request !187
parents 20c53865 ee3c7a63
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment