title: Why does `++a++` not compile in C++ but `(++a)++` does?
body: <p>What the title says. For C++, <code>(++a)++</code> does compile. Strangely enough, though, <code>++(a++)</code> does not:</p>
  
  <pre><code>int main() {
      int a = 0;
      ++a++; // does not compile
      (++a)++; // does compile
      ++(a++); // does not compile
  }
  </code></pre>
  
  <p>But in Java, it does not for all three:</p>
  
  <pre><code>public class Test {
      public static void main(String[] args) {
          int a = 0;
          ++a++; // does not compile
          (++a)++; // does not compile
          ++(a++); // does not compile
      }
  }
  </code></pre>
  
  <p>Is there any reason why C++ compiles this but not in Java?</p>