title: What does -> after a function prototype mean?
body: <p>What is happening in this code? Is so confusing.</p>
  
  <pre><code>#include &lt;utility&gt;
  
  struct check
  {
     template &lt;typename T&gt;
     auto foo() -&gt; decltype(std::declval&lt;T&gt;().value, void())
     {
        static_assert(T{}.value == 10, "Incorrect value");
     }
  } var;
  
  int main()
  {
     struct apple
     {
        int value{10};
     };
  
     var.foo&lt;apple&gt;();
  }
  </code></pre>
  
  <p>Specifically the part where it has <code>-&gt;</code> and everything after that.</p>