title: In C++20 when should use `iterator_traits<I>::value_type` and when should I use `iter_value_t`?
body: <p>C++20 concepts adds an <a href="https://en.cppreference.com/w/cpp/iterator/iter_t" rel="nofollow noreferrer">alternative way</a> to access iterator traits. For example <code>iter_value_t&lt;I&gt;</code> gives a similar result as <code>iterator_traits&lt;I&gt;::value_type</code>.<strike>I have noticed that <code>iterator_traits</code> do not appear to work in concept constraints.</strike>
  <code>iter_value_t</code> works for concepts, but it also works everywhere else.
  So my hunch is I should use the newer <code>iter_value_t</code> since it works in both contexts.</p>
  <p>Is this correct? When should I prefer one or the other?</p>
  <p><strong>EDIT:</strong> I was missing <code>typename</code> when using iterator_traits in concept constraints. The concepts gave me the jitters!</p>