<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/154173>154173</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
libc++ <memory> header does not include a required basic_ostream template.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc++
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
edfvogel
</td>
</tr>
</table>
<pre>
The following C++20 program compiles with clang++, but not when -stdlib=libc++ is specified:
#include <memory>
#define NK char
#define NT std::char_traits<char>
#define NU int
#define ND std::default_delete<NU>
#define NS std::basic_ostream<NK, NT>
#define WS std::basic_ostream<wchar_t, std::char_traits<wchar_t>>
void f00 (NS& a0, const std::unique_ptr<NU, ND>& a1) {
static_assert(
!noexcept(std::operator<< <NK, NT, NU, ND>(a0, a1)),
"Disallows exceptions");
}
Note that section Section 20.10.2 has:
template<class E, class T, class Y, class D>
basic_ostream<E, T>& operator<<(basic_ostream<E, T>& os, const unique_ptr<Y, D>& p);
Not a big deal. Just wanted to bring this to your attention.
Thank you,
Ed Vogel
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8VEGTqzYM_jXmolkG7LBJDhx2k82hbyaXzWunp4yxBbg1mGeLTfffdwzJkrxO34QJxv70SZ8kS4Zgmh6xZMUrK_aJHKl1vkRdf7gGbVI5_VmeWoTaWesupm9gx_gr4688g8G7xssOlOsGYzHAxVALysq-mTGM76AaCXpHcGmxh6dA2pqKib01lZpBYAKEAZWpDWomXlg2PVyYXtlRIzCx67Bz_pOJt69DjbXpEY7fQLXSP-6dINDEJF7i4Zm8NBSY2E3QmWRBfwfT0-PWfiHQWMvR0lmjRUImdsfv_2F4X-CVDEadXSCPsovobzEHx9PPNn_8wuYyBx0N_0fHDSHevlLy4YyGOsuA8c3xnfFnkFlkUK4PtPCMvfkx4nkgP0uJwe0jSTTIGd8CW7-y7AUAIJAko84yBPTE-CZuM573Dv9ROMSdL1o3oJfkIikTO7gXHv_v_WzmuCZn07O7ugNgnO9NkLHRAsxOjOsD4zwCRYyLrfez3qMjBGolQUAVYfB-ffMszbOUQyvDVzcRdoOVU_2UlSHA25SbaXlaln8uy_2c2Z9rM9mdrgl7VM345tfosNTjoQyT11sRhkXqTSdIqEwDGqVNAX4bA8FF9oQayEHl452k1oT49elGD5II-5iKdKY4tbL_Ox7NuWbZy5uG3-P1nr8SXQq9FVuZYJmvi6JY5ZkokrbMcoVVvskLfFY1f15VOVf1-lkUG15s1TZLTMkzXmSbPP7WeZFiodRmK6SSWmQ1arbKsJPGptZ-dKnzTWJCGLHMi1W-FomVFdowzR7Ol4kQC17sE19Gq6dqbAJbZdYECgsPGbJY3k2R-ykBLUqNHrTDMA2f2yiR4PHHaDxqeKgV3BokTUZvy5ZomJqHHxg_NIbasUqV6xg_xACur6fBu79QEeOHSVVg_HAV9lHyfwMAAP__VLCiYA">