<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54722>54722</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
std::optional<in_place, ...> fails with libstdc++
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
gotnone
</td>
</tr>
</table>
<pre>
The following code fails to compile on clang 8 -14 with libstdc++. It does compile with libc++.
```
#include <optional>
class Foo {
int a;
public:
Foo(int a) : a(a) {}
Foo(Foo&) = delete;
};
int main() {
std::optional<Foo> z(std::in_place, 1);
}
```
Try it on [godbolt](https://cpp.godbolt.org/z/bT4xP98TP).
Should this be crossposted to GCC Bugzilla?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtUktvozAQ_jXmMioCmwQ4cMijqfZWaXNfGeOAV1OMsGm2_fU7BpJutJWs8Yzn8zfP2jYf1bnTcLGI9mr6FpRtyJQGHXhL1ttgUIPtQaEkdwFPaQZX4ztAUzvfKMb3dGKAHx4aq939zw10Q7DkyJId2ybrWUwuTK9woqBMHOzgje0lMvG8umdJoZ2Dk7XA8v3yBGB6D5KJ1R6mGo1iYndzE5rxYgHxksh3QSkWg1jy4yNyltsFeoRGo_b6zh7Qd32WgfhNmp5-3hhXOupJSEPsvoo5BHLxDJ-EvrtN_2tAqTTjB0iJ4yHYd606jx9gfBgF2-xb29QWPdscibPzfnCBlZ_oqGGIV3dsx5ZeKO6pPmd_Xsvi_Eqh1lH87OyEDfjOOKg1qNE6N1jndRNG_3I4wH5qPw0itfkUNZVoSlHKyBuPuvquzH9LiuM4lLxs0v_7Ek0jVo95twSa6pjWhwzE99v1NIz2t1aeTOPcpB0pmyznPOqqyzaV2yIVMpH1pdDlpZTbRORK6SRLci0jlLVGV1HHGOe9vsJMQTp1LjIVTzgnJE9zIVIR60Sl-SZvMhHuTcGyRNOUMQ55hGZGYzWnVE-tIyca592Xk7bUtL3Wczjil5Pv7Fi11ve219EcuppT_wsLbAbX">