This code does not compile with range-v3 0.10.0 (or with master). It does compile with range-v3 0.9.1.
#include "range/v3/all.hpp"
struct double_it {
using value_type = double;
double x;
double& operator*() { return x; }
const double& operator*() const { return x; }
};
static_assert(ranges::readable<double_it>);
Which version is right ? In master, a type I is readable only if same_as<iter_reference_t<I const>, iter_reference_t<I>>. I don't understand why the return type of operator* should be the same as the one of operator* const.
Note: issue submitted on github here.