title: How to interpret this conditional statement with regard to std::errc
body: <p>I was reading an example of how to use <code>std::from_chars</code> function <a href="https://en.cppreference.com/w/cpp/utility/from_chars" rel="nofollow noreferrer">here</a>, when I came by the following if statment:</p>
  <pre><code>if(auto [p, ec] = std::from_chars(str.data(), str.data()+str.size(), result);
         ec == std::errc())
          std::cout &lt;&lt; result &lt;&lt; &quot;\n&quot; &quot;p -&gt; \&quot;&quot; &lt;&lt; p &lt;&lt; &quot;\&quot;\n&quot;;
  </code></pre>
  <p>Unfortunately I can not understand what <code>ec == std::errc()</code> means and how is it the condition. Does it mean that if <code>ec</code> (the possible error) is equal to default value of enum class <code>errc</code> the the following line should be executed? if so isn't that also an error?</p>
  <p>Can someone please explain it to me?</p>