Re: [PATCH v2] libstdc++: Fix std::uninitialized_value_construct for arrays [PR120397]

2025-06-13 Thread Daniel Krügler
Am Fr., 13. Juni 2025 um 11:33 Uhr schrieb Jonathan Wakely < jwak...@redhat.com>: > The std::uninitialized_{value,default}_construct{,_n} algorithms should > be able to create arrays, but that currently fails because when an > exception happens they clean up using std::_Destroy and in C++17 that >

Re: [committed] libstdc++: Replace _CharT template parameter with CharT in format tests.

2025-06-13 Thread Daniel Krügler
Am Fr., 13. Juni 2025 um 09:33 Uhr schrieb Tomasz Kamiński < tkami...@redhat.com>: > As pointed out by Daniel Krügler we do not need to use reserved name > in tests. > > libstdc++-v3/ChangeLog: > > * testsuite/23_containers/vector/bool/format.cc: Replaced _Ch

Re: [PATCH] libstdc++: Test chrono-spec containing only whitespaces.

2025-06-12 Thread Daniel Krügler
Am Do., 12. Juni 2025 um 16:40 Uhr schrieb Tomasz Kamiński < tkami...@redhat.com>: > libstdc++-v3/ChangeLog: > > * testsuite/std/time/format/whitespace.cc: New test. > --- > Testing on x86_64-linux. OK for trunk when test passes. > > .../testsuite/std/time/format/whitespace.cc | 54

Re: [PATCH v2] libstdc++: Use hidden friends for __normal_iterator operators

2025-06-12 Thread Daniel Krügler
Am Do., 12. Juni 2025 um 10:22 Uhr schrieb Jonathan Wakely < jwak...@redhat.com>: > On Thu, 12 Jun 2025 at 09:21, Jonathan Wakely wrote: > > > > On Thu, 12 Jun 2025 at 08:12, Daniel Krügler > wrote: > > > > > > Am Do., 12. Juni 2025 um 00:10 Uhr schr

Re: [PATCH v2] libstdc++: Use hidden friends for __normal_iterator operators

2025-06-12 Thread Daniel Krügler
Am Do., 12. Juni 2025 um 00:10 Uhr schrieb Jonathan Wakely < jwak...@redhat.com>: > As suggested by Jason, this makes all __normal_iterator operators into > friends so they can be found by ADL and don't need to be separately > exported in module std. > > The operator<=> comparing two iterators of

Re: [PATCH v6 6/8] libstdc++: Implement layout_stride from mdspan.

2025-06-04 Thread Daniel Krügler
Am Mi., 4. Juni 2025 um 17:18 Uhr schrieb Luc Grosheintz < luc.groshei...@gmail.com>: > Implements the remaining parts of layout_left and layout_right; and all > of layout_stride. > > The implementation of layout_stride::mapping::is_exhaustive applies > the following change to the standard: > >

Re: [PATCH] libstdc++: Fix format call and test formatting with empty specs for durations.

2025-06-04 Thread Daniel Krügler
Am Mi., 4. Juni 2025 um 12:57 Uhr schrieb Tomasz Kaminski < tkami...@redhat.com>: > > > On Wed, Jun 4, 2025 at 12:43 PM Daniel Krügler > wrote: > >> Am Mi., 4. Juni 2025 um 11:27 Uhr schrieb Tomasz Kamiński < >> tkami...@redhat.com>: >> >

Re: [PATCH] libstdc++: Fix format call and test formatting with empty specs for durations.

2025-06-04 Thread Daniel Krügler
Am Mi., 4. Juni 2025 um 11:27 Uhr schrieb Tomasz Kamiński < tkami...@redhat.com>: > This patches fixes an obvious error, where the output iterator argument was > missing for call to format_to, when duration with custom representation > types > are used. > > It's also adding the test for behavior o

Re: [PATCH 2/2] libstdc++: Implement C++26 std::indirect [PR119152]

2025-05-22 Thread Daniel Krügler
Am Do., 22. Mai 2025 um 11:48 Uhr schrieb Tomasz Kamiński < tkami...@redhat.com>: > From: Jonathan Wakely > > This papers implements C++27 std::indirect as specified > in P3019 with ammendment to move assgiment from LWG 4251. > > PR libstdc++/119152 > > libstdc++-v3/ChangeLog: > >

Re: [PATCH 1/2] libstdc++: Define _Scoped_allocation RAII helper

2025-05-22 Thread Daniel Krügler
Am Do., 22. Mai 2025 um 11:41 Uhr schrieb Tomasz Kamiński < tkami...@redhat.com>: > From: Jonathan Wakely > > libstdc++-v3/ChangeLog: > > * include/bits/allocated_ptr.h (_Scoped_allocation): New class > template. > > Co-Authored-By: Tomasz Kamiński > Signed-off-by: Tomasz Kamińsk

Re: [PATCH 1/2] libstdc++: Define _Scoped_allocation RAII helper

2025-05-22 Thread Daniel Krügler
Am Do., 22. Mai 2025 um 12:25 Uhr schrieb Tomasz Kaminski < tkami...@redhat.com>: > > > On Thu, May 22, 2025 at 12:21 PM Daniel Krügler > wrote: > >> >> >> Am Do., 22. Mai 2025 um 11:41 Uhr schrieb Tomasz Kamiński < >> tkami...@redhat.com>:

Re: [PATCH] libstdc++: Fix std::format_kind primary template for Clang [PR120190]

2025-05-15 Thread Daniel Krügler
Am Do., 15. Mai 2025 um 13:00 Uhr schrieb Jonathan Wakely < jwak...@redhat.com>: > Although Clang trunk has been adjusted to handle our std::format_kind > definition (because they need to be able to compile the GCC 15.1.0 > release), it's probably better to not rely on something that they might >

Re: [PATCH] libstdc++: Fix std::runtime_format deviations from the spec [PR113320]

2024-01-11 Thread Daniel Krügler
Am Do., 11. Jan. 2024 um 21:23 Uhr schrieb Jonathan Wakely : > > Tested x86_64-linux. Does this look better now? Yes, thank you. - Daniel

Re: [committed 2/2] libstdc++: Implement P2918R0 "Runtime format strings II" for C++26

2024-01-10 Thread Daniel Krügler
Am Mo., 8. Jan. 2024 um 03:25 Uhr schrieb Jonathan Wakely : > > Tested x86_64-linux and aarch64-linux. Pushed to trunk. > > -- >8 -- > > This adds std::runtime_format for C++26. These new overloaded functions > enhance the std::format API so that it isn't necessary to use the less > ergonomic std::

Re: [committed] libstdc++: Define C++26 saturation arithmetic functions (P0543R3)

2023-11-17 Thread Daniel Krügler
Am Fr., 17. Nov. 2023 um 18:31 Uhr schrieb Jonathan Wakely : > > On Fri, 17 Nov 2023 at 17:01, Daniel Krügler > wrote: > > [..] > > > + > > > +namespace std _GLIBCXX_VISIBILITY(default) > > > +{ > > > +_GLIBCXX_BEGIN_NAMESPACE_VERSION > &

Re: [committed] libstdc++: Define C++26 saturation arithmetic functions (P0543R3)

2023-11-17 Thread Daniel Krügler
Am Fr., 17. Nov. 2023 um 16:32 Uhr schrieb Jonathan Wakely : > > Tested x86_64-linux. Pushed to trunk. > > GCC generates better code for add_sat if we use: > > unsigned z = x + y; > z |= -(z < x); > return z; > > If the compiler can't be improved we should consider using that instead > of __builtin

Re: [PATCH 2/2] libstdc++: use new built-in trait __is_pointer

2023-07-09 Thread Daniel Krügler via Gcc-patches
Am Mo., 10. Juli 2023 um 07:24 Uhr schrieb Ken Matsui via Libstdc++ : > > This patch lets libstdc++ use new built-in trait __is_pointer. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_pointer): Use __is_pointer > built-in trait. > (is_pointer_v): Likewise. > >

Re: [committed] libstdc++: Fix constexpr functions in

2023-03-30 Thread Daniel Krügler via Gcc-patches
Am Do., 30. März 2023 um 18:00 Uhr schrieb Jonathan Wakely via Libstdc++ : > [..] > > In fact, thinking about P2641 some more, I might revert this change. > Instead of adding an extra bool member to support constexpr, I think > I'll just remove the 'constexpr' keywords from basic_endpoint for now,

Re: [committed] libstdc++: Add missing __cpp_lib_format macro to

2023-03-22 Thread Daniel Krügler via Gcc-patches
Am Mi., 22. März 2023 um 18:53 Uhr schrieb Jonathan Wakely via Libstdc++ : > > Tested powerpc64le-linux, pushed to trunk. > > -- >8-- > > libstdc++-v3/ChangeLog: > > * include/std/version (__cpp_lib_format): Define. > * testsuite/std/format/functions/format.cc: Check it. > --- > li

Re: [committed] libstdc++: Fix preprocessor condition for inline variables

2023-03-14 Thread Daniel Krügler via Gcc-patches
Am Di., 14. März 2023 um 12:02 Uhr schrieb Jonathan Wakely : > > On Tue, 14 Mar 2023 at 10:51, Daniel Krügler wrote: >> >> Apologies for the late response: >> > > I only just committed the change, so it's not delayed :-) > > >> >> What about cha

Re: [committed] libstdc++: Fix preprocessor condition for inline variables

2023-03-14 Thread Daniel Krügler via Gcc-patches
Am Di., 14. März 2023 um 11:32 Uhr schrieb Jonathan Wakely via Libstdc++ : > > Tested x86_64-linux. Pushed to trunk. > > -- >8 -- > > Although variable templates are valid in C++14, inline ones aren't. > These are only used in C++17 (or later) code, so they don't need to be > defined for C++14. > >

Re: [PATCH] libstdc++: Add Doxygen comment for string::resize_and_overwite

2023-02-23 Thread Daniel Krügler via Gcc-patches
Am Do., 23. Feb. 2023 um 18:38 Uhr schrieb Jonathan Wakely via Libstdc++ : > > Reviews of the resize_and_overwite description welcome. I've tried to > strike a balance between pedantic precision and user-friendliness. > > -- >8 -- > > This is a complicated API that should be clearly documented. > >

Re: [committed] libstdc++: Improve performance of chrono::utc_clock::now()

2022-11-17 Thread Daniel Krügler via Gcc-patches
Am Do., 17. Nov. 2022 um 10:48 Uhr schrieb Jonathan Wakely : > > > > On Thu, 17 Nov 2022 at 09:47, Jonathan Wakely wrote: >> >> >> >> On Thu, 17 Nov 2022 at 09:25, Daniel Krügler >> wrote: >>> >>> Am Do., 17. Nov. 2022 um 10:07 Uhr

Re: [committed] libstdc++: Improve performance of chrono::utc_clock::now()

2022-11-17 Thread Daniel Krügler via Gcc-patches
Am Do., 17. Nov. 2022 um 10:07 Uhr schrieb Jonathan Wakely : > > > > On Thu, 17 Nov 2022, 06:30 Daniel Krügler via Libstdc++, > wrote: >> >> Am Mi., 16. Nov. 2022 um 22:00 Uhr schrieb Jonathan Wakely via >> Libstdc++ : >> > >> > Te

Re: [committed] libstdc++: Improve performance of chrono::utc_clock::now()

2022-11-16 Thread Daniel Krügler via Gcc-patches
Am Mi., 16. Nov. 2022 um 22:00 Uhr schrieb Jonathan Wakely via Libstdc++ : > > Tested x86_64-linux. Pushed to trunk. > > -- >8 -- > > We can use an array instead of a std::vector, and we can avoid the > binary search for the common case of a time point after the most recent > leap second. On one sy

Re: [PATCH 2/3] libstdc++: Implement ranges::iota from P2440R1

2022-11-14 Thread Daniel Krügler via Gcc-patches
Am Mo., 14. Nov. 2022 um 11:09 Uhr schrieb Jonathan Wakely via Libstdc++ : > > On Mon, 14 Nov 2022 at 04:52, Patrick Palka via Libstdc++ > wrote: > > > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? > > > > libstdc++-v3/ChangeLog: > > > > * include/bits/ranges_algo.h (out_va

Re: [committed] libstdc++: Find make_error_code and make_error_condition via ADL only

2022-09-12 Thread Daniel Krügler via Gcc-patches
Am Do., 8. Sept. 2022 um 20:30 Uhr schrieb Jonathan Wakely via Libstdc++ : > > Tested powerpc64le-linux, pushed to trunk. > > -- >8 -- > > The new proposed resolution for LWG 3629 says that std::error_code and > std::error_condition should only use ADL to find their customization > points. This mea

Re: [PATCH][Hashtable 6/6] PR 68303 small size optimization

2021-12-20 Thread Daniel Krügler via Gcc-patches
Am Di., 21. Dez. 2021 um 07:08 Uhr schrieb François Dumont via Libstdc++ : > > Hi > > Is there a chance for this patch to be integrated for next gcc > release ? > > François > No counterargument for the acceptance, but: Shouldn't __small_size_threshold() be a noexcept function? - Daniel

Re: [PATCH 1/5] libstdc++: Import the fast_float library

2021-11-16 Thread Daniel Krügler via Gcc-patches
Am Di., 16. Nov. 2021 um 16:31 Uhr schrieb Patrick Palka via Libstdc++ : > [..] > -- >8 -- > > Subject: [PATCH 1/5] libstdc++: Import the fast_float library > [..] > +## Reference > + > +- Daniel Lemire, [Number Parsing at a Gigabyte per > Second](https://arxiv.org/abs/2101.11408), Software: Prati

Re: [PATCH] libstdc++: Clear padding bits in atomic compare_exchange

2021-11-02 Thread Daniel Krügler via Gcc-patches
Am Di., 2. Nov. 2021 um 02:26 Uhr schrieb Thomas Rodgers via Libstdc++ : > > This should address Jonathan's feedback and adds support for atomic_ref > I'm wondering why __clear_padding doesn't refer to the computed __ptr value in the case where __builtin_clear_padding is used? Thanks, - Daniel

Re: [committed] libstdc++: Support printing volatile pointers (P1147R1)

2021-10-05 Thread Daniel Krügler via Gcc-patches
Am Di., 5. Okt. 2021 um 10:55 Uhr schrieb Jonathan Wakely via Libstdc++ : > > To avoid needing to export a new symbol from the library (for now) the > new member function uses __attribute__((always_inline)). > > libstdc++-v3/ChangeLog: > > * include/std/ostream (operator<<(const volatile vo

Re: [committed] libstdc++: Allow visiting inherited variants [PR 90943]

2021-10-02 Thread Daniel Krügler via Gcc-patches
Am Fr., 1. Okt. 2021 um 21:57 Uhr schrieb Jonathan Wakely via Libstdc++ : > > Implement the changes from P2162R2 (as a DR for C++17). > > Signed-off-by: Jonathan Wakely > > libstdc++-v3/ChangeLog: > > PR libstdc++/90943 > * include/std/variant (__cpp_lib_variant): Update value. >

Re: [PATCH 4/4] libstdc++: Add fallback 128-bit integer class type and use it

2021-03-11 Thread Daniel Krügler via Gcc-patches
Am Do., 11. März 2021 um 18:17 Uhr schrieb Patrick Palka via Libstdc++ : > > This implements a minimal integer class type that emulates 128-bit > unsigned arithmetic using a pair of 64-bit integers, which the > floating-point std::to_chars implementation then uses as a drop-in > replacement for uns

Re: [PATCH] 2/2 Remove debug/array

2020-12-03 Thread Daniel Krügler via Gcc-patches
Am Do., 3. Dez. 2020 um 18:10 Uhr schrieb Jonathan Wakely via Libstdc++ : > [..] > >>Ok to commit ? > > > >Yes, this is a nice simplification, thanks. > > This broke the C++11 constexpr support in std::array. Fixed with this > patch. Tested x86_64-linux, committed to trunk. Wouldn't a transformati

Re: [committed] libstdc++: Fix std::gcd and std::lcm for unsigned integers [PR 92978]

2020-08-28 Thread Daniel Krügler via Gcc-patches
Am Sa., 29. Aug. 2020 um 00:12 Uhr schrieb Jonathan Wakely via Libstdc++ : > > This fixes a bug with mixed signed and unsigned types, where converting > a negative value to the unsigned result type alters the value. The > solution is to obtain the absolute values of the arguments immediately > and

Re: [committed] libstdc++: Add __maybe_const_t and __maybe_empty_t aliases

2020-02-26 Thread Daniel Krügler
Am Mi., 26. Feb. 2020 um 16:20 Uhr schrieb Jonathan Wakely : > > This introduces a couple of convenience alias templates to be used for > some repeated patterns using std::conditional_t. I find it a bit confusing/inconsistent to define __maybe_const_t such that the bool argument says "is const", w

Re: [PATCH] libstdc++: P0769R2 Add shift to

2020-02-24 Thread Daniel Krügler
Am Mo., 24. Feb. 2020 um 15:12 Uhr schrieb Patrick Palka : > > On Mon, 24 Feb 2020, Jonathan Wakely wrote: > [...] > > > @@ -3683,6 +3683,98 @@ namespace ranges > > > inline constexpr __prev_permutation_fn prev_permutation{}; > > > > > > } // namespace ranges > > > + > > > + template > > > +

Re: [committed] libstdc++: Add lightweight replacement for std::numeric_limits (PR 92546)

2020-02-17 Thread Daniel Krügler
Am Mo., 17. Feb. 2020 um 16:33 Uhr schrieb Jonathan Wakely : > > Many uses of std::numeric_limits in C++17 and C++20 features only really > need the min(), max() and digits constants for integral types. By adding > __detail::__int_limits we can avoid including the whole header. numeric_limits has

Re: [PATCH] libstdc++: Optimize C++20 comparison category types

2020-02-07 Thread Daniel Krügler
Am Fr., 7. Feb. 2020 um 15:23 Uhr schrieb Jonathan Wakely : > > On 07/02/20 10:04 +0100, Daniel Krügler wrote: > >Am Do., 6. Feb. 2020 um 15:28 Uhr schrieb Jonathan Wakely > >: > >> > >> On 06/02/20 13:53 +, Jonathan Wakely wrote: > >> &g

Re: [PATCH] libstdc++: Optimize C++20 comparison category types

2020-02-07 Thread Daniel Krügler
Am Do., 6. Feb. 2020 um 15:28 Uhr schrieb Jonathan Wakely : > > On 06/02/20 13:53 +, Jonathan Wakely wrote: > >On 06/02/20 13:40 +, Jonathan Wakely wrote: > >>This reduces sizeof(std::partial_ordering) and optimizes conversion and > >>comparison operators to avoid conditional branches where

Re: [PATCH] libsupc++: Implement comparison algorithms for C++20

2019-11-13 Thread Daniel Krügler
Am Mi., 13. Nov. 2019 um 17:26 Uhr schrieb Jonathan Wakely : > > This is incomplete because std::strong_order doesn't support > floating-point types. I'm wondering whether the local __cat lambda expression at the beginning of __fp_weak_ordering is part of the incomplete code or just spurious? - D

Re: PR 90409 Deque fiil/copy/move/copy_backward/move_backward/equal overloads

2019-08-01 Thread Daniel Krügler
Am Do., 1. Aug. 2019 um 13:01 Uhr schrieb Jonathan Wakely : > > On 01/08/19 12:36 +0200, Daniel Krügler wrote: > >Am Do., 1. Aug. 2019 um 11:57 Uhr schrieb Jonathan Wakely > >: > >> > >> More comments inline below ... > >[..] > >> > >>

Re: PR 90409 Deque fiil/copy/move/copy_backward/move_backward/equal overloads

2019-08-01 Thread Daniel Krügler
Am Do., 1. Aug. 2019 um 11:57 Uhr schrieb Jonathan Wakely : > > More comments inline below ... [..] > > >François > > > >On 6/19/19 7:32 PM, François Dumont wrote: > >>I wanted to implement Debug overloads for those already existing > >>overloads but then realized that those algos could be generali

Re: [PATCH] Fix ODR violations in code using

2019-07-05 Thread Daniel Krügler
Am Fr., 5. Juli 2019 um 18:13 Uhr schrieb Jonathan Wakely : > [..] > I decided against the simplification in the second patch, and > committed the attached one which is closer to the first patch I sent > (preserving the __atomic_add and __exchange_and_add functions even > when they just call the bu

Re: [PATCH] Disable -Wctor-dtor-privacy warnings for some standard types

2019-06-15 Thread Daniel Krügler
Am Sa., 15. Juni 2019 um 12:52 Uhr schrieb Daniel Krügler : > > Am Fr., 14. Juni 2019 um 16:05 Uhr schrieb Jonathan Wakely > : > > > > These types are not constructible by design, so we never want warnings > > for them, even with -Wsystem-headers. > > &

Re: [PATCH] Disable -Wctor-dtor-privacy warnings for some standard types

2019-06-15 Thread Daniel Krügler
Am Fr., 14. Juni 2019 um 16:05 Uhr schrieb Jonathan Wakely : > > These types are not constructible by design, so we never want warnings > for them, even with -Wsystem-headers. > > * include/experimental/type_traits (experimental::nonesuch): Use > pragma to disable -Wctor-dtor-privac

Re: [PATCH] Add __gnu_test::NullablePointer utility to testsuite

2019-05-14 Thread Daniel Krügler
Am Di., 14. Mai 2019 um 13:20 Uhr schrieb Jonathan Wakely : > > * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc: > Use operator-> to access raw pointer member. > * testsuite/23_containers/vector/59829.cc: Likewise. > * testsuite/23_containers/vec

Re: [PATCH] Improve API docs for header

2019-05-04 Thread Daniel Krügler
Am Sa., 4. Mai 2019 um 16:37 Uhr schrieb Jonathan Wakely : > > * include/std/system_error (error_category, error_code) > (error_condition): Improve docs. > * libsupc++/exception: Add missing @addtogroup Doxygen command. > * libsupc++/exception_ptr.h (exception_ptr):

Re: Implement C++20 constexpr , , and

2019-03-29 Thread Daniel Krügler
Am Fr., 29. März 2019 um 19:08 Uhr schrieb Ed Smith-Rowland via libstdc++ : > > I made __memmove and __memcmp inline so that, certainly for C++ < 20 > these don't pessimize. Hmmh, are you sure? In my (not very up-to-date) code base I find that c++config.h defines #ifndef _GLIBCXX20_CONSTEXPR # if

Re: [PATCH, libstdc++] Implement P0415 More constexpr for std::complex.

2018-11-16 Thread Daniel Krügler
Am Fr., 16. Nov. 2018 um 18:13 Uhr schrieb Ed Smith-Rowland <3dw...@verizon.net>: > > Greetings, > > This is late but I wanted to put it out there just to finish a thing. > > It's fairly straightforward constexpr of operators and some simple > functions for std::complex. > > The only thing that jum

Re: std::advance istreambuf_iterator overload

2017-11-13 Thread Daniel Krügler
2017-11-13 21:23 GMT+01:00 François Dumont : > On 10/11/2017 21:57, Jonathan Wakely wrote: >>> diff --git a/libstdc++-v3/include/bits/streambuf_iterator.h >>> b/libstdc++-v3/include/bits/streambuf_iterator.h >>> index 0a6c7f9..b60626a 100644 >>> --- a/libstdc++-v3/include/bits/streambuf_iterator.h

Re: Rename cxx1998 into normal

2017-10-26 Thread Daniel Krügler
2017-10-26 7:51 GMT+02:00 François Dumont : > Hi > > We once talk about rename the __cxx1998 namespace into something less > C++98 biased. Here is the patch to do so. > > Ok with the new name ? IMO the name should somehow still contain "cxx" somewhere, otherwise this could easily cause a s

Re: std::forward_list optim for always equal allocator

2017-09-11 Thread Daniel Krügler
2017-09-11 22:36 GMT+02:00 François Dumont : [..] > So my remark was rather for the: > > _Fwd_list_iterator() noexcept > : _M_node() { } > > that could simply be > > _Fwd_list_iterator() = default; > > no ? Yes, that should be fine. - Daniel

Re: std::forward_list optim for always equal allocator

2017-09-10 Thread Daniel Krügler
2017-09-11 7:12 GMT+02:00 François Dumont : > When user declare a container iterator like that: > > std::forward_list::iterator it; > > There is no reason to initialize it with a null node pointer. It is just an > uninitialized iterator which is invalid to use except to initialize it. While that i

Re: [PATCH] PR libstdc++/79162 ambiguity in string assignment due to string_view overload (LWG 2946)

2017-08-18 Thread Daniel Krügler
Hi, This is a friendly reminder asking for a review of the suggested patch! Thanks, - Daniel 2017-07-30 15:01 GMT+02:00 Daniel Krügler : > 2017-07-28 22:40 GMT+02:00 Daniel Krügler : >> 2017-07-28 22:29 GMT+02:00 Daniel Krügler : >>> 2017-07-28 22:25 GMT+02:00 Tim Song : &

Re: [PATCH] PR libstdc++/79162 ambiguity in string assignment due to string_view overload (LWG 2946)

2017-07-30 Thread Daniel Krügler
2017-07-28 22:40 GMT+02:00 Daniel Krügler : > 2017-07-28 22:29 GMT+02:00 Daniel Krügler : >> 2017-07-28 22:25 GMT+02:00 Tim Song : >>> On Fri, Jul 28, 2017 at 4:10 PM, Daniel Krügler >>> wrote: >>>> + // Performs an implicit conversion from

Re: [PATCH] PR libstdc++/79162 ambiguity in string assignment due to string_view overload (LWG 2946)

2017-07-28 Thread Daniel Krügler
2017-07-28 22:29 GMT+02:00 Daniel Krügler : > 2017-07-28 22:25 GMT+02:00 Tim Song : >> On Fri, Jul 28, 2017 at 4:10 PM, Daniel Krügler >> wrote: >>> + // Performs an implicit conversion from _Tp to __sv_type. >>> + template >>> +st

Re: [PATCH] PR libstdc++/79162 ambiguity in string assignment due to string_view overload (LWG 2946)

2017-07-28 Thread Daniel Krügler
2017-07-28 22:25 GMT+02:00 Tim Song : > On Fri, Jul 28, 2017 at 4:10 PM, Daniel Krügler > wrote: >> + // Performs an implicit conversion from _Tp to __sv_type. >> + template >> +static __sv_type _S_to_string_view(const _Tp& __svt) >> +

[PATCH] PR libstdc++/79162 ambiguity in string assignment due to string_view overload (LWG 2946)

2017-07-28 Thread Daniel Krügler
This patch attempts to solve an issue in basic_string after adding string_view to several functions that came in during incomplete patch of LWG 2758/LWG 2946, in short: Functions that take a string_view parameter value are now replaced by constrained templates taking const T& that is convertible to

Re: std::forward_list optim for always equal allocator

2017-07-17 Thread Daniel Krügler
2017-07-17 22:10 GMT+02:00 François Dumont : > Hi > > Here is the patch to implement the always equal alloc optimization for > forward_list. With this version there is no abi issue. > > I also prefer to implement the _Fwd_list_node_base move operator for > consistency with the move construc

Re: [PATCH] Add header implementation of std::to_string for integers (PR libstdc++/71108)

2017-05-28 Thread Daniel Krügler
2017-05-28 21:38 GMT+02:00 Adrian Wielgosik : >> so a conforming program could notice the difference by either calling >> std::setlocale. > > Unless I missed or misunderstood something about locale (please let me > know if I did), I don't know of any way for locale to affect %d and > its integer f

Re: [PATCH] Add header implementation of std::to_string for integers (PR libstdc++/71108)

2017-05-28 Thread Daniel Krügler
2017-05-27 23:46 GMT+02:00 Adrian Wielgosik : > Currently std::to_string takes a fairly long trip to vs(n/w)printf. The patch > implements int-to-string formatting in header, to improve function > performance. The existing specification of std::to_string is specified in a way that would make this

Re: [C++ PATCH, RFC] Implement new C++ intrinsics __is_assignable and __is_constructible.

2017-05-12 Thread Daniel Krügler
2017-05-12 12:39 GMT+02:00 Ville Voutilainen : > I have tested this with the full suite on Linux-PPC64. It works otherwise > fine, > but there's one snag: 20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc > fails, and it looks like the trait ends up instantiating the definition > of a destru

Re: [Patch] Inline Variables for the Standard Library (p0607r0)

2017-03-21 Thread Daniel Krügler
2017-03-12 1:04 GMT+01:00 Daniel Krügler : > 2017-03-11 23:14 GMT+01:00 Daniel Krügler : >> 2017-03-11 23:09 GMT+01:00 Tim Song : >>> On Sat, Mar 11, 2017 at 3:37 PM, Daniel Krügler >>> wrote: >>>> 2017-03-11 21:23 GMT+01:00 Tim Song : >>>&g

Re: [PATCH] Implement LWG 2686, hash

2017-03-21 Thread Daniel Krügler
2017-03-12 13:16 GMT+01:00 Daniel Krügler : > The following is an *untested* patch suggestion, please verify. > > Notes: My interpretation is that hash should be > defined outside of the _GLIBCXX_COMPATIBILITY_CXX0X block, please > double-check that course of action. > &g

[PATCH] Implement LWG 2686, hash

2017-03-12 Thread Daniel Krügler
The following is an *untested* patch suggestion, please verify. Notes: My interpretation is that hash should be defined outside of the _GLIBCXX_COMPATIBILITY_CXX0X block, please double-check that course of action. I noticed that the preexisting hash did directly refer to the private members of er

Re: [Patch] Inline Variables for the Standard Library (p0607r0)

2017-03-11 Thread Daniel Krügler
2017-03-11 23:14 GMT+01:00 Daniel Krügler : > 2017-03-11 23:09 GMT+01:00 Tim Song : >> On Sat, Mar 11, 2017 at 3:37 PM, Daniel Krügler >> wrote: >>> 2017-03-11 21:23 GMT+01:00 Tim Song : >>>> On Sat, Mar 11, 2017 at 1:32 PM, Daniel Krügler >>>>

Re: [Patch] Inline Variables for the Standard Library (p0607r0)

2017-03-11 Thread Daniel Krügler
2017-03-11 23:09 GMT+01:00 Tim Song : > On Sat, Mar 11, 2017 at 3:37 PM, Daniel Krügler > wrote: >> 2017-03-11 21:23 GMT+01:00 Tim Song : >>> On Sat, Mar 11, 2017 at 1:32 PM, Daniel Krügler >>> wrote: >>>> This patch applies inline to all namespace scope

Re: [Patch] Inline Variables for the Standard Library (p0607r0)

2017-03-11 Thread Daniel Krügler
2017-03-11 21:23 GMT+01:00 Tim Song : > On Sat, Mar 11, 2017 at 1:32 PM, Daniel Krügler > wrote: >> This patch applies inline to all namespace scope const variables >> according to options A and B2 voted in during the Kona meeting, see: >> >> http://wiki.edg.c

[Patch] Inline Variables for the Standard Library (p0607r0)

2017-03-11 Thread Daniel Krügler
This patch applies inline to all namespace scope const variables according to options A and B2 voted in during the Kona meeting, see: http://wiki.edg.com/pub/Wg21kona2017/StrawPolls/p0607r0.html During that work it has been found that std::ignore was not declared constexpr (http://cplusplus.githu

Re: [PATCHv2] do not throw in std::make_exception_ptr

2016-08-04 Thread Daniel Krügler
2016-08-05 6:49 GMT+02:00 Gleb Natapov : > Instead of throwing an exception allocate its memory and initialize it > explicitly. Makes std::make_exception_ptr more efficient since no stack > unwinding is needed. [..] > +#ifndef _CXXABI_INIT_EXCEPTION_H > +#define _CXXABI_INIT_EXCEPTION_H 1 > + > +

Re: [libstdc++] Add C++17clamp

2016-07-22 Thread Daniel Krügler
2016-07-22 9:55 GMT+02:00 Jonathan Wakely : > On 22/07/16 08:51 +0100, Jonathan Wakely wrote: >> >> On 21/07/16 19:38 -0400, NightStrike wrote: >>> >>> On Thu, Jul 14, 2016 at 7:50 PM, Ed Smith-Rowland <3dw...@verizon.net> >>> wrote: Here is an implementation of P0025 An algorithm to

Re: [v3 PATCH] Implement P0307R2, Making Optional Greater Equal Again.

2016-07-16 Thread Daniel Krügler
2016-07-13 20:32 GMT+02:00 Ville Voutilainen : > On 13 July 2016 at 21:25, Daniel Krügler wrote: >> How would you feel about the introduction of an internal trait >> __is_boolean_testable, that would test both is_convertible> bool> and is_constructible for now, so that we c

Re: [PATCH] Add constexpr to iterator adaptors, array and range access

2016-07-16 Thread Daniel Krügler
2016-07-16 1:09 GMT+02:00 Jonathan Wakely : > This patch implements http://wg21.link/p0031 which adds constexpr to > most operations on std::reverse_iterator, std::move_iterator, > std::array, as well as std::advance, std::distance, and the > range-access functions std::begin, std::rbegin etc. > >

Re: [PATCH] Remove redundant std::move in std::for_each

2016-07-15 Thread Daniel Krügler
2016-07-15 21:53 GMT+02:00 Jonathan Wakely : > Returning a parameter will try to move anyway, so using std::move here > is redundant (and clang even warns about it being redundant). > > * include/bits/stl_algo.h (for_each): Remove redundant _GLIBCXX_MOVE > and adjust comment. Actua

Re: [v3 PATCH] Implement P0307R2, Making Optional Greater Equal Again.

2016-07-13 Thread Daniel Krügler
2016-07-13 12:05 GMT+02:00 Ville Voutilainen : > On 13 July 2016 at 01:31, Jonathan Wakely wrote: >> On 11/07/16 23:41 +0300, Ville Voutilainen wrote: >>> >>> @@ -785,41 +785,60 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION >>> } >>> }; >>> >>> + template >>> +using __optional_relop_t = >>>

Re: [Patch] Implement is_[nothrow_]swappable (p0185r1) - 2nd try

2016-06-16 Thread Daniel Krügler
2016-06-16 17:07 GMT+02:00 Jonathan Wakely : > On 16/06/16 14:08 +0100, Jonathan Wakely wrote: >> >> >> /home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/20_util/is_nothrow_swappable/./value.h:285:3: >> error: static assertion failed >> >> /home/jwakely/src/gcc/gcc/libstdc++-v3/testsuite/20_util/is_

Re: [Patch] Implement is_[nothrow_]swappable (p0185r1) - 2nd try

2016-06-15 Thread Daniel Krügler
2016-06-14 23:22 GMT+02:00 Daniel Krügler : > This is an implementation of the Standard is_swappable traits according to > > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0185r1.html > > During that work it has been found that std::array's member swap's exce

[Patch] Implement is_[nothrow_]swappable (p0185r1) - 2nd try

2016-06-14 Thread Daniel Krügler
This is an implementation of the Standard is_swappable traits according to http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0185r1.html During that work it has been found that std::array's member swap's exception specification for zero-size arrays was incorrectly depending on the value_ty

Re: [Patch] Implement is_[nothrow_]swappable (p0185r1)

2016-05-24 Thread Daniel Krügler
2016-05-23 13:50 GMT+02:00 Jonathan Wakely : > On 17/05/16 20:39 +0200, Daniel Krügler wrote: >> >> This is an implementation of the Standard is_swappable traits according to >> >> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0185r1.html >> >>

[Patch] Implement is_[nothrow_]swappable (p0185r1)

2016-05-17 Thread Daniel Krügler
This is an implementation of the Standard is_swappable traits according to http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0185r1.html During that work it has been found that std::array's member swap's exception specification for zero-size arrays was incorrectly depending on the value_ty

Re: New hashtable power 2 rehash policy

2016-05-14 Thread Daniel Krügler
2016-05-14 18:13 GMT+02:00 François Dumont : > New patch attached, tested under linux x86_64. > > François 1) The function __clp2 is declared using _GLIBCXX14_CONSTEXPR, which means that it is an inline function if and *only* if _GLIBCXX14_CONSTEXPR really expands to constexpr, otherwise it is *n

Re: [v3 PATCH] Avoid endless run-time recursion for copying single-element tuples where the element type is by-value constructible from any type

2016-05-08 Thread Daniel Krügler
Have you considered to test against decay instead of remove_reference/remove_const? That would be similar to other places in the standard. (I also believe that your fix actually should be submitted as an LWG issue) - Daniel 2016-05-08 13:43 GMT+02:00 Ville Voutilainen : > Tested on Linux-PPC64. >

Re: [patch] libstdc++/69240 generic operator!= for random number distributions

2016-01-14 Thread Daniel Krügler
2016-01-14 20:21 GMT+01:00 Jonathan Wakely : > We could constrain the generic operator== and operator!= to only match > types that we want it to match, e.g. by having a type trait that is > true for all our distributions and their parameter types. That would > mean adding a specialization of it for

Re: [Patch, libstdc++/68877] Reimplement __is_[nothrow_]swappable

2016-01-12 Thread Daniel Krügler
Ping - this is a tentative reminder for this patch proposal. 2015-12-23 22:15 GMT+01:00 Daniel Krügler : > This is a second try for a patch for libstdc++ bug 68877. See below > for responses. > > 2015-12-22 22:42 GMT+01:00 Jonathan Wakely : >> On 21/12/15 12:45 +0100, Da

Re: [Patch, libstdc++/68877] Reimplement __is_[nothrow_]swappable

2015-12-23 Thread Daniel Krügler
This is a second try for a patch for libstdc++ bug 68877. See below for responses. 2015-12-22 22:42 GMT+01:00 Jonathan Wakely : > On 21/12/15 12:45 +0100, Daniel Krügler wrote: >> >> 2015-12-14 21:48 GMT+01:00 Daniel Krügler : >>> >>> This is a reimp

Re: [Patch, libstdc++/68877] Reimplement __is_[nothrow_]swappable

2015-12-22 Thread Daniel Krügler
2015-12-22 22:42 GMT+01:00 Jonathan Wakely : > On 21/12/15 12:45 +0100, Daniel Krügler wrote: >> >> 2015-12-14 21:48 GMT+01:00 Daniel Krügler : >>> >>> This is a reimplementation of __is_swappable and >>> __is_nothrow_swappable according to >>&

Re: [Patch, libstdc++/68877] Reimplement __is_[nothrow_]swappable

2015-12-21 Thread Daniel Krügler
2015-12-14 21:48 GMT+01:00 Daniel Krügler : > This is a reimplementation of __is_swappable and > __is_nothrow_swappable according to > > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4511.html > > and also adds a missing usage of __is_nothrow_swappable in the swap >

[Patch, libstdc++/68877] Reimplement __is_[nothrow_]swappable

2015-12-14 Thread Daniel Krügler
This is a reimplementation of __is_swappable and __is_nothrow_swappable according to http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4511.html and also adds a missing usage of __is_nothrow_swappable in the swap overload for arrays. Strictly speaking the latter change differs from the Sta

Re: [patch] Enable lightweight checks with _GLIBCXX_ASSERTIONS.

2015-09-07 Thread Daniel Krügler
2015-09-07 22:10 GMT+02:00 Jonathan Wakely : > On 07/09/15 20:53 +0100, Jonathan Wakely wrote: >> On 07/09/15 21:04 +0200, Daniel Krügler wrote: >>> In the suggested doc changes: >>> >>> +When defined, _GLIBCXX_ASSERTIONS is defined >>> +

Re: [patch] Enable lightweight checks with _GLIBCXX_ASSERTIONS.

2015-09-07 Thread Daniel Krügler
2015-09-07 20:27 GMT+02:00 Jonathan Wakely : > This patch adds the "debug mode lite" we've been talking about, by > changing __glibcxx_assert to be activated by _GLIBCXX_ASSERTIONS > instead of _GLIBCXX_DEBUG (and making the latter imply the former). > > _GLIBCXX_ASSERTIONS is already used in Paral

Re: Elimitate duplication of get_catalogs in different abi

2015-08-22 Thread Daniel Krügler
2015-08-21 23:11 GMT+02:00 François Dumont : > I think I found a better way to handle this problem. It is c++locale.cc > that needs to be built with --fimplicit-templates. I even think that the > *_cow.cc file do not need this option but as I don't know what is the > drawback of this option I kept

Re: [patch] libstdc++/66742 use allocators correctly in list::sort()

2015-07-03 Thread Daniel Krügler
2015-07-03 17:51 GMT+02:00 Jonathan Wakely : > As well as reducing the number of lists we construct when sorting this > also allows us to range-check and ensure we don't overflow the > fixed-size array (we now get an exception if that happens, although > that's probably not possible even on a 64-bi

Re: [patch] std::polar requires non-negative rho

2015-05-13 Thread Daniel Krügler
2015-05-13 16:05 GMT+02:00 Marc Glisse : > On Wed, 13 May 2015, Daniel Krügler wrote: >> What about assertions regarding non-NAN rho and finite theta, as >> decided for by the LWG 2439? > > non-NAN rho is already covered by rho >= 0. Agreed on that. - Daniel

Re: [patch] std::polar requires non-negative rho

2015-05-13 Thread Daniel Krügler
2015-05-13 15:32 GMT+02:00 Jonathan Wakely : > http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4383.html#2459 > > Voted into the WP in Lenexa. > > Tested powerpc64le-linux, comitted to trunk. What about assertions regarding non-NAN rho and finite theta, as decided for by the LWG 2439? -

Re: [patch] Fix std::experimental::any for small, non-trivial objects

2015-05-02 Thread Daniel Krügler
2015-05-02 19:33 GMT+02:00 Jonathan Wakely : > Looking at it now, I think the _Internal alias template should also > check that alignof(_Tp) <= alignof(void*) so that it can safely be > stored in the _Storage. > > Otherwise a type with sizeof(T) <= sizeof(void*) but > alignof(T) > alignof(void*) wo

Re: [patch] std::experimental::ostream_joiner

2015-05-02 Thread Daniel Krügler
2015-05-02 19:14 GMT+02:00 Jonathan Wakely : > The last piece of the Library Fundamentals 2 TS (until next week when > all of v1 gets voted into v2, when it will include the v1 stuff we're > missing). > > Tested powerpc64le-linux, committed to trunk. Do you really want to copy the ugliness of the

Re: [patch] Fix std::experimental::any for small, non-trivial objects

2015-05-02 Thread Daniel Krügler
2015-05-02 15:03 GMT+02:00 Jonathan Wakely : > Here's a much smaller patch for the gcc5 branch, which just avoids the > small-object optimisation for non-trivially-copyable types. This > pessimises some types, but is safe. > > (Given that this stuff is all "experimental" anyway, maybe we could > ju

Re: [patch] Implement ISO/IEC TS 18822 C++ File system TS

2015-05-01 Thread Daniel Krügler
2015-05-01 20:22 GMT+02:00 Jonathan Wakely : > On 01/05/15 19:03 +0200, Daniel Krügler wrote: >> >> b/libstdc++-v3/src/filesystem/path.cc: >> >> - path::compare(const path& p) const noexcept: >> >> Shouldn't the implementation of this noexcept func

Re: [patch] Implement ISO/IEC TS 18822 C++ File system TS

2015-05-01 Thread Daniel Krügler
2015-04-30 19:32 GMT+02:00 Jonathan Wakely : > This is the complete implementation I intend > to commit shortly. (It's also been pushed to the redi/filesystem-ts > branch in the git mirror). - There are three places where you refer to std::__addressof and one where you refer to std::addressof. Is

  1   2   >