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

    <tr>
        <th>Summary</th>
        <td>
            clang: __has_extension(cxx_default_function_template_args) with -std=c++98
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          acoplan-arm
      </td>
    </tr>
</table>

<pre>
    For the following C++ code compiled with -std=c++98:
```
template<int I = 42>
int f() { return I; }
int g() { return f(); }
#if !__has_extension (cxx_default_function_template_args)
#warning oops
#endif
```
clang accepts it with warnings:
```
<source>:1:14: warning: default template arguments for a function template are a C++11 extension [-Wc++11-extensions]
template<int I = 42>
             ^   ~~
<source>:5:2: warning: oops [-W#warnings]
#warning oops
 ^
```
the first of which indicates that clang supports default template arguments for function templates in C++98 mode as an extension, but the second shows that `__has_extension (cxx_default_function_template_args)` returns 0 in C++98 mode.

Perhaps `__has_extension (cxx_default_function_template_args)` should evaluate to 1 in C++98 mode?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyklE2P8yYQxz_N-DJKhMF2koMPeXkiPbfeeowwHttUGCzAT7aX_eyVE3uz3aTqqo3iNxiY-f_4gwxBt5aohPwA-SmRY-ycL6Vyg5F2JX2fVK7-szw7j7EjbJwx7qpti0fgB-AHVK4mVK4ftKEarzp2uAqxBnFS94jdFsQe2AnYHgo2_2-fkfrByEggjtpG_IkgTphxED_u_VNjA3wLfIewOaCnOHqLP0EcEDanR1D7HDSP-1socKEbBJ5eLp0MF3qLZIN2FoFv1dvbpaZGjiZemtGqqJ29LAVepG_DNNsyzVV6O0FwbggfjWRr3bwUqoy0LUqlaIgBdbxjmicJ_4QHxDG40SuagIh9Ol0ZiP0ycHqdS8alUpS-HXuyMWDjPEpctHyOIJTL8qUpfsKQH1a_q6Vj9dERID99b8Xw8w_yH4j4_v5STQ5iz7-ImWjei3ggfuR-iX1K8tpbk1m1DxFdg9dOqw61rbWSkQLGTka8L0oYh8H5GP6N5BPHgNouFHdb7KdtIANK-wAK_IjVGG8bJ5BytsbQueucHwr2n31YsNnnAdlzHeuZyO3-G_lOTlz_X7rQudHUSL-kGSc60WH6nBnEOalLUe_ETiZUpsWWMZYWjCVdKUVOJNJGCSo4FVW9qbJNXWWiaKjh1S7RJWdcMMG3acqKjK1lmsqaFZuMhMoVryBj1Ett1sb86tfOt4kOYaSySDf5NjGyIhOWg8yXU9CqGtsAGTM6xPAYFnU0VN4MMPnuC5fvYnl92CWjN2UX43Db1_wM_Nzq2I3VWrke-HkqYn6sBu_-IBWBn29CAvDzTctfAQAA__8sD8CE">