Skip to content

Instantly share code, notes, and snippets.

@evanzillians
Last active December 17, 2015 07:39
Show Gist options
  • Save evanzillians/5574144 to your computer and use it in GitHub Desktop.
Save evanzillians/5574144 to your computer and use it in GitHub Desktop.
ADL fails on boost::integer_range
#include <vector>
#include <boost/range/iterator_range.hpp>
#include <boost/range/irange.hpp>
int main() {
std::vector<int> v;
auto range_1 = boost::make_iterator_range(v);
auto range_2 = boost::irange(0, 1);
begin(range_1); // ok
end(range_1); // ok
begin(range_2); // not found
end(range_2); // not found
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment