<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - requires{ member_fn; } within a member function is true, despite member_fn; being an error"
   href="https://bugs.llvm.org/show_bug.cgi?id=51904">51904</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>requires{ member_fn; } within a member function is true, despite member_fn; being an error
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++2a
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nyanpasu64@tuta.io
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=25271" name="attach_25271" title="Test case for requires{} expressions">attachment 25271</a> <a href="attachment.cgi?id=25271&action=edit" title="Test case for requires{} expressions">[details]</a></span>
Test case for requires{} expressions

If I define a class with a `void member_fn()` which contains `requires{
member_fn; }`, it evaluates to true on Clang but is an error on GCC, despite
`member_fn;` being an error on both compilers.

If I define a `template<typename T> Class : T` instantiated with a `T`
containing `base_fn()`, and `Class` contains a member function with `requires{
T::base_fn; }`, it evaluates to true on Clang but false on GCC, despite
`base_fn;` being an error on both compilers.

Is this a Clang bug, or is my code ill-formed? I was using the value of
`requires{}` as an input to `if constexpr` or `static_assert`, rather than as a
concept or template bound; is this allowed?

I've attached a file testing whether `requires{}` in various positions is true,
false, or an error to evaluate.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>