[libcxx-commits] [PATCH] D155276: [libc++] Implement ostringstream members of P0408R7 (Efficient Access to basic_stringbuf's Buffer)
Piotr Fusik via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jul 15 08:14:11 PDT 2023
pfusik added inline comments.
================
Comment at: libcxx/include/sstream:967
+ template <class _SAlloc>
+ _LIBCPP_HIDE_FROM_ABI explicit basic_ostringstream(const basic_string<_CharT, _Traits, _SAlloc>& __s,
+ ios_base::openmode __wch = ios_base::out)
----------------
Mordante wrote:
> This overload should be constrained `is_same_v<SAlloc,Allocator> is false`
Also in `istringstream` and `stringstream`.
It seems to work fine without the explicit constraint, selecting the non-template constructor, e.g. `ostringstream.cons/string.pass.cpp`.
I think this is because https://timsong-cpp.github.io/cppwp/over.match.best#general-2.4
Or do we need to have "requires" every time the standard says "Constraints:" ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155276/new/
https://reviews.llvm.org/D155276
More information about the libcxx-commits
mailing list