[libcxx-commits] [PATCH] D129195: [libc++] Implement P1423R3 (char8_t backward compatibility remediation)

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 19 13:15:51 PDT 2022


Mordante added inline comments.


================
Comment at: libcxx/test/std/input.output/iostream.format/output.streams/ostream/deleted_output_functions.verify.cpp:24
+  s << wchar_t();                      // expected-error {{overload resolution selected deleted operator '<<'}}
+  s << std::declval<const wchar_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+#endif
----------------
philnik wrote:
> Mordante wrote:
> > philnik wrote:
> > > Mordante wrote:
> > > > Mainly curious, but will `std::declval<wchar_t*>();` be valid? I expect it will.
> > > No it isn't valid. The deleted `const wchar_t*` overload is the best match.
> > How do you feel about adding explicit test cases?
> Sure, I don't expect `CharT*` and `const CharT*` to ever have different behaviour. I think that would be //very// surprising.
The Standard has some hidden gems where the const matters ;-)
https://cplusplus.github.io/LWG/issue3701

But generally I agree.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129195/new/

https://reviews.llvm.org/D129195



More information about the libcxx-commits mailing list