title: [expr.unary.op]/9 seems to imply that the `operator !()` could not be applied to the type A below. But compilers disagree with that
body: <p><a href="http://eel.is/c++draft/conv#4" rel="noreferrer">[conv]/4</a>:</p>
  
  <blockquote>
    <p>Certain language constructs require that an expression be converted to
    a Boolean value. An expression <code>e</code> appearing in such a context is said
    to be <em>contextually converted to <code>bool</code></em> and is well-formed if and
    only if the declaration <code>bool t(e);</code> is well-formed, for some invented
    temporary variable <code>t</code> (11.6).</p>
  </blockquote>
  
  <p>Consider now the snippet below. It doesn't compile, neither in <a href="http://coliru.stacked-crooked.com/a/866ba3623fba4dc8" rel="noreferrer">clang</a>, <a href="http://coliru.stacked-crooked.com/a/049a411350ef8cd6" rel="noreferrer">GCC</a> or <a href="http://rextester.com/WMHEMU15817" rel="noreferrer">VS</a>.</p>
  
  <pre><code>struct A{ bool operator!() { return true; } };
  int main(){
      A a;
      bool t(a);
  }
  </code></pre>
  
  <p>Thus, from [conv]/4 we conclude that the type <code>A</code> is <strong>not</strong> contextually converted to <code>bool</code>.</p>
  
  <p><a href="http://eel.is/c++draft/expr.unary.op#9" rel="noreferrer">[expr.unary.op]/9</a>:</p>
  
  <blockquote>
    <p>The operand of the logical negation operator <code>!</code> is contextually
    converted to <code>bool</code> (Clause 7); its value is <code>true</code> if the converted
    operand is <code>false</code> and <code>false</code> otherwise. The type of the result is
    <code>bool</code>.</p>
  </blockquote>
  
  <p>My understanding of the paragraph above is that the operand of the logical negation operator <code>!</code> must be contextually converted to <code>bool</code>. We have just concluded that the type <code>A</code> is <strong>not</strong> contextually converted to <code>bool</code>. Therefore, from [expr.unary.op]/9, we can say that the following code should <strong>not</strong> compile. But it does, in <a href="http://coliru.stacked-crooked.com/a/7ea19016164fa08b" rel="noreferrer">clang</a>, <a href="http://coliru.stacked-crooked.com/a/8900f6d1a76aac88" rel="noreferrer">GCC</a> and <a href="http://rextester.com/YUX54013" rel="noreferrer">VS</a>.</p>
  
  <pre><code>struct A{ bool operator!() { return true; } };
  int main(){
      A a;
      bool t = !a;
  }
  </code></pre>
  
  <p>What am I missing?</p>