<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58245>58245</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Clang rejects use of static constexpr member function in noexcept complete-class context 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ranaanoop
      </td>
    </tr>
</table>

<pre>
    The following valid program is rejected by clang as well as other compilers. [Demo](https://godbolt.org/z/Ph4vfGjzd)

```
struct A {
   constexpr static bool func() 
   { 
       return true; 
   }
   //--------------vvvvvv------->works as expected   #1
   void f(bool V1 = func())
   { 
      bool V2 = func(); //works as expected          #2
   }
   //-----------------vvvvvv---->DOESN'T WORK?       #3
   void g()  noexcept(func()) 
   {
      ;
   }

};
```
>From [class.mem.general](https://eel.is/c++draft/class.mem.general#7.4):

> A complete-class context of a class is a
> * function body
> * default argument
> * **noexcept specifier**

As we can see the noexcept speficier is included in the complete-class context so the `#3` should work. 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVEtv2zAM_jXyhajhyHYeBx-Spd1hwDpsxXaWbdpWJ1uBJCdtf_0oJU3iPoAJ8oOiSH4kP6nU9XPx0CE0Wil9kEMLe6FkDTujWyN6kBYMPmLlsIbyGSolaIuwcECl_Fe7Dg1Uut9JhcbGwPLNFnvN8i3jy865nWXpmvE7mq2uS61crE1L0gs9P7ps33x9fKkZX7Fky5L16T1PTjOI1pmxcrAGttgcVwAo5mAdPu0MWCecrKDUWkEzDhUFJn9w3klWF8EPg240A5BXZOnmeuP28h8g30zGPoyTwNLbgzZ_ra8CwTiWyNuls7OTvaZSNoQnYPs9A5ZuryCes_4A5NGCv7XwcAOyj2KfBkHg_53TJC3KaXt_--s744sH-HP_8xtL7y5O02le7anOMGh8qnDnSJ7kNunAdW6UxXt8pzeJr9o3LLgzuvf0Ig5aG_fYxy0OaIT6iGuIKpaWfgjOhmZtROO8-M6Yp4s4C6VdT4Ckt0Q4T2yFDm-CneccUc6BbkDAcYkOiLhYML4O3XJSD9TC-nmqqrERo3IgTDv2OLiplh6ar9UES32VjURzXL8Gt_YHECoxgEUEOoJwbdXIiqw8MjlUaqyJG3IIuz5Jx-qg9ZX2XZ4nYDs9qho8yWKIsJjN5znPZ7NlHtVFWq_SlYicdAqLL-FGON4RFkaLvjinE3k5olTwkiCdS0N4zog_ARWNRhVvLhDpurGMyYAEpfavnxu6rXx8EqW1I_q-50ue5VFX5FXZ5E22FA2uSrFaYbbgWDXLpGmSvFokkRIlKlsQsRjnAx4guKB_olUkC55wPkuS5WyRzXke1yUmWZUssSYv5SJjWYK9kCr2OPzNFpkiQCrH1pJSSevsRUkJynZADOHIvxhdp01hxCDEoPUuCsGLAP4fLGKmUA">