ericniebler / stl2

LaTeX and Markdown source for the Ranges TS/STL2 and associated proposals

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exposition-only has-arrow concept is ill-formed

ericniebler opened this issue · comments

template<InputIterator I>
  concept has-arrow = // exposition only
    is_pointer_v<I> || requires(I i) { i.operator->(); };

A concept cannot have a constrained template parameter. Should be:

Proposed Resolution

template<class I>
  concept has-arrow = // exposition only
    InputIterator<I> && (is_pointer_v<I> || requires(I i) { i.operator->(); });