title: (void)r++ requirement of input iterator
body: <p>Under <code>24.2.3 Input iterators</code>, the C++ standard specifies one of the requirements of input iterator as the expression <code>(void)r++</code> being equivalent to <code>(void)++r</code>.</p>
  
  <p>You can also see this at <a href="http://en.cppreference.com/w/cpp/concept/InputIterator" rel="nofollow">cppreference</a>.</p>
  
  <p>What is that expression? What is the significance of this requirement? Why is it needed?</p>
  
  <p>It looks like a C style cast to void of the result of <code>r++</code> or <code>++r</code> but I don't think that's what it really is. That said, to digress a bit, it looks like I can define a <code>void</code> conversion operator inside a class. Both gcc and clang compile it but clang gives the warning:</p>
  
  <blockquote>
    <p>warning: conversion function converting 'C' to 'void' will never be
    used</p>
  </blockquote>