User Details
- User Since
- Jul 16 2012, 3:06 PM (558 w, 1 d)
Nov 28 2022
Sep 10 2022
Jun 6 2022
Nov 29 2021
The definition of max_size() is the maximum number of elements that a string_view can hold.
(Actual definition: Returns: The largest possible number of char-like objects that can be referred to by a basic_string_view.)
Nov 22 2021
Nov 5 2021
Sep 8 2021
When I wrote span, I tried to do it this way, and I found that it led to much more complicated code.
Maybe span has changed enough that this is no longer true - dunno.
Aug 19 2021
What's the goal here? In terms of behavior?
Aug 17 2021
LGTM
Aug 16 2021
There's also all the ones in __functional/operations.h, like greater_equal<void>
Aug 12 2021
I suggest you take all the techniques at http://graphics.stanford.edu/~seander/bithacks.html and make sure they don't cause a warning.
Aug 2 2021
Jul 30 2021
Jul 27 2021
I am not an approver for LLVM, but this LGTM.
I would like to see you undo all the formatting changes.
They are not germane for this patch, and (IMHO) reduce the readability of the code.
Jun 8 2021
How about some tests?
May 27 2021
May 3 2021
wchar is 2 bytes not 4,
Mar 1 2021
(2.3) — a #include of <ciso646>, <cstdalign>, or <cstdbool> can simply be removed.
This makes me think that it maybe better to generate #error instead of trying to workaround MSVC problem.
@mclow.lists, @ldionne, what do you think?
Feb 16 2021
That cppreference page you quote says:
The same words are defined in the C programming language in the include file <iso646.h> as macros. Because in C++ these are built into the language, the C++ version of <iso646.h>, as well as <ciso646>, does not define anything.
Feb 7 2021
There's no 128 bit integral support, which I'd like to have in std::format, I can add a __u128toa to fix this.
Why do we need *another* integer to string conversion function in libc++?
Jan 22 2021
- If the standard says they should be noexecpt, we should keep them noexcept.
- Yes, file an LWG issue.
Jan 18 2021
Ok, I take it back. __str_find calls Traits::find, which is NOT always noexcept. (It *is* for all the specializations of std::char_traits, but that's not enough). So we can't slap NOEXCEPT here; in fact, we should revisit __str_find, and remove some of the NOEXCEPTs that are already there.
Jan 14 2021
Jan 13 2021
The C11 standard states (in section 7.21.7.5 The getc function):
Jan 7 2021
This looks like WAY too much code for "add string contains".
Dec 18 2020
If you don't have a steady clock, then none of the timed synchronization calls can work.
Starting in C++11, the standard library requires a monotonic clock.
Dec 17 2020
Dec 16 2020
How about something more like:
make_string<char>( " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN" "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~") == " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN" "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
You need to bump the TEST_STD_VER too - see test/support/test_macros.h
Dec 15 2020
Dec 14 2020
Dec 10 2020
if you allocate memory with an allocator, you need to deallocate it with the same allocator. Not with operator delete
if you need to remove something for C++03, then the test would be:
#ifndef _LIBCPP_CXX03_LANG
Dec 9 2020
I'm not seeing any coordination between different syncbufs on the same stream here.
My impression was that implementing this required a global registry of streams that had syscstreams associated with them.
Dec 3 2020
Dec 2 2020
Consider the following program:
I think this is the wrong direction - getting rid of _LIBCPP_NO_HAS_CHAR8_T
We're making the feature macro __cpp_lib_char8_t always match __cpp_char8_t
There are two macros for a reason.
Dec 1 2020
Nov 30 2020
And we should be careful to define __cpp_lib_char8_t only when we provide the feature (which we do, based on _LIBCPP_NO_HAS_CHAR8_T)
(reading back)
Could you elaborate / invent artificial scenario when such logic is necessary?
I don't have to invent any such logic. It's right there in the existing code.
Commented there.
For the record, the link is https://reviews.llvm.org/D92212 (without the trailing slash.
Alternately, you can just write D92212 and Phab will figure it out.
Nov 27 2020
Has clang-format been improved enough that it will not "wreck" std::less<void>? Last time I tried it on that code, it pessimized it pretty thoroughly.
Code pasted here for reference:
#if _LIBCPP_STD_VER > 11 template <> struct _LIBCPP_TEMPLATE_VIS less<void> { template <class _T1, class _T2> _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY auto operator()(_T1&& __t, _T2&& __u) const _NOEXCEPT_(noexcept(_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u))) -> decltype (_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u)) { return _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); } typedef void is_transparent; }; #endif
Nov 26 2020
It would be nice if the test had a reference to the bug report.
Nov 10 2020
Nov 5 2020
I'm fine with this.
This is not how I'd write it, but that's ok :-)
Nov 3 2020
I'm fine with rebasing and committing this.
LGTM
Oct 16 2020
Oct 14 2020
So the goals of this patch should be:
- Resolve the original problem,
- Decide if the problem shown in D1723 is real, and if so, make sure that still works, and
- Make all the containers do resolve this the same way.
Is this a problem unique to vector? Do the other containers have the same constructor? Do those constructors have the same issue?
Checking ... list does not seem to have this problem. deque does not either. forward_list does not either.
Oct 2 2020
A general comment - is someone going to run a libc++ test bot for NuttX? Otherwise, how will we know when changes that we make to libc++ break NuttX support?
Sep 30 2020
Sep 25 2020
I would rather see:
llvm_unreachable("unexpected type"); return ""; // or string()
Sep 5 2020
LGTM.
Aug 6 2020
A couple of quick comments, more to come.
Jul 30 2020
Jul 21 2020
I see no tests.
Jul 18 2020
Jun 30 2020
Jun 29 2020
General comment: would it not be better to make the compiler smarter to solve this (and reap the benefits for vector and other code)?
Jun 16 2020
I wouldn't change the __advance definitions. That's just spreading the pain around. Convert from Distance to iterator_traits<...>::difference_type in advance
Jun 15 2020
Jun 4 2020
So I don't understand what the observable difference is here. Could you add a test?
Jun 3 2020
I've got nothing to say here.
May 21 2020
LGTM. Feel free to ignore the clang-format whining.
This is not sufficient; it just "moves the pain" from the callers code into the dylib. All the functions in charconv.cpp need to be marked as noexcept.
May 6 2020
BTW, string(nullptr, 0) is a valid call. The range [nullptr, nullptr) is valid.
May 5 2020
You're not really solving the problem you're talking about.
Feb 24 2020
This looks fine to me.