title: C++: Best way to access overloaded operator++ with std::unique_ptr?
body: <p>If I have a class with an overloaded operator++, for example:</p>
  
  <p>In header:</p>
  
  <pre><code>SomeClass&amp; operator++(int);
  </code></pre>
  
  <p>Implementation:</p>
  
  <pre><code>SomeClass&amp; SomeClass::operator++(int) { someLocalVar++; return this; }
  </code></pre>
  
  <p>If I then instantiate <code>SomeClass</code> in an <code>std::unique_ptr</code>:</p>
  
  <pre><code>std::unique_ptr&lt;SomeClass&gt; someClass(new SomeClass());
  </code></pre>
  
  <p>And I then want to call <code>operator++</code> some <code>someClass</code>, I use:</p>
  
  <pre><code>someClass.get()-&gt;operator++(0);
  </code></pre>
  
  <p>I understand I could do something like:</p>
  
  <pre><code>SomeClass *ptrSomeClass = someClass.release();
  ptrSomeClass++;
  </code></pre>
  
  <p>but this is also quite lengthy, and kind of defeats the purposes of using <code>std::unique_ptr</code> in the first place.</p>
  
  <p>If there a better way of calling an overloaded <code>operator++</code> with <code>std::unique_ptr</code>?</p>