<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54340>54340</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Modules] Default template argument is not exported
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JohelEGP
</td>
</tr>
</table>
<pre>
See https://godbolt.org/z/5YsKzrTGY, which GCC accepts: https://godbolt.org/z/53KnzYWob.
```C++
export module mod;
export template<class> struct X { };
export template<class T = int> using Y = X<T>;
```
```C++
import mod;
int main() {
Y<>{};
}
```
```
test.cpp:3:3: error: default argument of 'Y' must be imported from module 'mod' before it is required
Y<>{};
^
mod.cpp:3:27: note: default argument declared here is not reachable
export template<class T = int> using Y = X<T>;
^
1 error generated.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytk1FvmzAQxz-NeTkNETuE8MBDm3SVVk2atEpbHm18ASaDmW3WrZ9-Z0jSrtrWPQzZYJ_P9__dGSurf1QfEaENYfRMXDH-llpjtbImpNY1NHuknh_83aO7vz0wvoOHtqtbuN3tQNY1jiFufD2CuBseD5-sSlm2Z9nV6b3JlrZj_Dq22YrfR-sC9FZPBuOHiV9XAvajkQGZ2NVGetK9AR_cVAf4DKy4pr5_bQ_cAxN76IYQd0--Gxo4zKbP5HJPxkuEC-Xr6F1_Rr_sJgXoZTcwvmW8jHiLHeBAQlGHLM944_gfZJdpQB_Sehyp8uLUAZ2zLg40HuVkAkjXTD0Shj0C4wUdYgH95AMohAUYNRyd7c8lJ4eYAbkpPFpHXgE6Dw6_Tp1D_Xd-AJbfLEMK8gyOFxFqsPEMfgOnkc6FokOLUdFHT5KUdSuVwf91lvDH50K9WioIDQ7oSEWnL0qf6EroUpQyCV0wWLH8-v1cOM_yPexPiZ0hnzI85bQkgTqZnKle3JsutJNKa9vTxJhv58-b0dkvWAeadt5PJEQ3ai3WWdJWOeZaiHKjtnwjc-LS9VbpfFNjtlG8WCdGKjQ-UjLOB3yAOQSNiTbpKp5xnonValXyMs_TleKbUhSYb3WGvJBsnSH9viaNHPFCJ66akdTUeFo0nQ_-aZFOo2sGnIsS48sptNZV72yL5ub2QzJrVzP7TwhIUGE">