But this function is only a friend of __iterator, it has no special access to the fun_ member of transform_view, so GCC rejects this. A reduced example:
class A
{
static int i;
public:
struct B
{
friend int return_i () { return i; }
};
};
Clang is the only compiler on godbolt that accepts this testcase.
The declaration of iter_move in transform.hpp looks like
But this function is only a friend of __iterator, it has no special access to the fun_ member of transform_view, so GCC rejects this. A reduced example:
Clang is the only compiler on godbolt that accepts this testcase.