[libcxx-commits] [PATCH] D154454: [libc++] Implement istringstream members of P0408R7 (Efficient Access to basic_stringbuf's Buffer)
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 10 11:22:07 PDT 2023
Mordante added inline comments.
================
Comment at: libcxx/include/sstream:863
+ template <class _SAlloc>
+ requires __is_allocator<_SAlloc>::value
+ _LIBCPP_HIDE_FROM_ABI basic_string<char_type, traits_type, _SAlloc> str(const _SAlloc& __sa) const {
----------------
Mordante wrote:
> pfusik wrote:
> > Mordante wrote:
> > > This function is not constrained in the Standard. Why is it needed?
> > If we omit this constraint, we get:
> > ```
> > call to member function 'str' is ambiguous
> > ss.str(" 789");
> > ```
> > I think the standard should include it.
> Thanks. I want to look at this locally. If this indeed is needed it looks like a defect in the Standard.
>
> When this is a bug in the Standard we should file an LWG issue and mention that in the code.
> (No need to take an action now, I first want to test.)
This is correct. I got reminded the `Equivalent to` wording "inherits" the constrains.
(And indeed tests fails without the constrain.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154454/new/
https://reviews.llvm.org/D154454
More information about the libcxx-commits
mailing list