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

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

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. > --- >

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 chang

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

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

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

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:

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

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

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

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",

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

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

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? -

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

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

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

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. > *

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 #

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

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 >>> ---

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

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

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 <daniel.krueg...@gmail.com>: > 2017-07-28 22:40 GMT+02:00 Daniel Krügler <daniel.krueg...@gmail.com>: >> 2017-07-28 22:29 GMT

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 <daniel.krueg...@gmail.com>: > 2017-07-28 22:29 GMT+02:00 Daniel Krügler <daniel.krueg...@gmail.com>: >> 2017-07-28 22:25 GMT+02:00 Tim Song <t.canens@gmail.com>: >>> On Fri, Jul 28, 2017 at 4:10 PM, Daniel Krügler &

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 <daniel.krueg...@gmail.com>: > 2017-07-28 22:25 GMT+02:00 Tim Song <t.canens@gmail.com>: >> On Fri, Jul 28, 2017 at 4:10 PM, Daniel Krügler >> <daniel.krueg...@gmail.com> wrote: >>> + // Performs an

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 <t.canens@gmail.com>: > On Fri, Jul 28, 2017 at 4:10 PM, Daniel Krügler > <daniel.krueg...@gmail.com> wrote: >> + // Performs an implicit conversion from _Tp to __sv_type. >> + template >> +static _

[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

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

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

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

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

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 <daniel.krueg...@gmail.com>: > 2017-03-11 23:14 GMT+01:00 Daniel Krügler <daniel.krueg...@gmail.com>: >> 2017-03-11 23:09 GMT+01:00 Tim Song <t.canens@gmail.com>: >>> On Sat, Mar 11, 2017 at 3:37 PM, Daniel Krügler &

Re: [PATCH] Implement LWG 2686, hash

2017-03-21 Thread Daniel Krügler
2017-03-12 13:16 GMT+01:00 Daniel Krügler <daniel.krueg...@gmail.com>: > 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

[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

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 <daniel.krueg...@gmail.com>: > 2017-03-11 23:09 GMT+01:00 Tim Song <t.canens@gmail.com>: >> On Sat, Mar 11, 2017 at 3:37 PM, Daniel Krügler >> <daniel.krueg...@gmail.com> wrote: >>> 2017-03-11 21:23

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 <t.canens@gmail.com>: > On Sat, Mar 11, 2017 at 3:37 PM, Daniel Krügler > <daniel.krueg...@gmail.com> wrote: >> 2017-03-11 21:23 GMT+01:00 Tim Song <t.canens@gmail.com>: >>> On Sat, Mar 11, 2017 at 1:32 PM, Daniel

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 <t.canens@gmail.com>: > On Sat, Mar 11, 2017 at 1:32 PM, Daniel Krügler > <daniel.krueg...@gmail.com> wrote: >> This patch applies inline to all namespace scope const variables >> according to options A and B2 voted i

[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

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

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

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 <ville.voutilai...@gmail.com>: > On 13 July 2016 at 21:25, Daniel Krügler <daniel.krueg...@gmail.com> wrote: >> How would you feel about the introduction of an internal trait >> __is_boolean_testable, that would tes

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,

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

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 >>> } >>> }; >>> >>> +

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 >> >>

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 <daniel.krueg...@gmail.com>: > 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::

[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

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

2016-05-24 Thread Daniel Krügler
2016-05-23 13:50 GMT+02:00 Jonathan Wakely <jwak...@redhat.com>: > 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/p0

[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

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

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

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

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 <daniel.krueg...@gmail.com>: > 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 <jwak...@

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 <jwak...@redhat.com>: > On 21/12/15 12:45 +0100, Daniel Krügler wrote: >> >> 2015-12-14 21:48 GMT+01:00 Daniel Krügler <d

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 <jwak...@redhat.com>: > On 21/12/15 12:45 +0100, Daniel Krügler wrote: >> >> 2015-12-14 21:48 GMT+01:00 Daniel Krügler <daniel.krueg...@gmail.com>: >>> >>> This is a reimplementation of __is_swapp

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 <daniel.krueg...@gmail.com>: > 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 o

[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

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 <jwak...@redhat.com>: > 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

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

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 frs.dum...@gmail.com: 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

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 jwak...@redhat.com: 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

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 jwak...@redhat.com: 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

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 marc.gli...@inria.fr: 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] 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 jwak...@redhat.com: 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

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

2015-05-02 Thread Daniel Krügler
2015-05-02 19:14 GMT+02:00 Jonathan Wakely jwak...@redhat.com: 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

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 jwak...@redhat.com: 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)

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 jwak...@redhat.com: This is the complete experimental/filesystem 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

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 jwak...@redhat.com: 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 function not try to create copies of path objects

Re: [PATCH] [libstdc++] Add uniform container erasure.

2015-04-30 Thread Daniel Krügler
2015-04-30 16:44 GMT+02:00 Ed Smith-Rowland 3dw...@verizon.net: And make_array, which isn't in the working paper yet, so I'd prefer to leave that part out for now. D'oh! Sorry about that.. Removed. The Doxygen @headername command tells users which header they are supposed to include,

Re: [Patch, libstdc++/65420] Use constexpr variables as regex_constans flags

2015-03-15 Thread Daniel Krügler
2015-03-15 9:09 GMT+01:00 Tim Shen timshe...@gmail.com: Did a little bit refectoring on regex_constants, so that users won't be polluted too much (they are not enum types anymore). Your implementation choice is an interesting approach. I believe that a strict reading of the library

Re: [Patch, libstdc++/63920] Fix regex_constants::match_not_null behavior

2014-11-19 Thread Daniel Krügler
2014-11-19 19:42 GMT+01:00 Tim Shen tims...@google.com: On Wed, Nov 19, 2014 at 8:16 AM, Paolo Carlini paolo.carl...@oracle.com wrote: Good. To be clear, not having carefully analyzed whatsoever, my point was more about changing _M_end too, to non-const, than about not touching _M_begin.

Re: [patch] Support embedded zeros in sub_match comparisons (DR 2217)

2014-11-13 Thread Daniel Krügler
2014-11-13 23:30 GMT+01:00 Tim Shen tims...@google.com: On Thu, Nov 13, 2014 at 2:11 PM, Daniel Krügler daniel.krueg...@gmail.com wrote: + typedef typename sub_match_Bi_iter::string_type string_type; Use _String_type instead of string_type? I'm not 100% sure of this. I thought about

Re: [patch] Make std::vectorbool meet C++11 allocator requirements.

2014-10-31 Thread Daniel Krügler
2014-10-31 21:49 GMT+01:00 Jonathan Wakely jwak...@redhat.com: There's no better time to fix evil vectorbool than Halloween. Great - so you removed vectorbool?;-) - Daniel

Re: sort_heap complexity guarantee

2014-10-07 Thread Daniel Krügler
2014-10-07 23:11 GMT+02:00 François Dumont frs.dum...@gmail.com: On 06/10/2014 23:05, Daniel Krügler wrote: François, could you please submit a corresponding LWG issue by sending an email using the recipe described here: http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#submit_issue

Re: sort_heap complexity guarantee

2014-10-06 Thread Daniel Krügler
2014-10-06 23:00 GMT+02:00 François Dumont frs.dum...@gmail.com: On 05/10/2014 22:54, Marc Glisse wrote: On Sun, 5 Oct 2014, François Dumont wrote: I took a look at PR 61217 regarding pop_heap complexity guarantee. Looks like we have no test to check complexity of our algos so I start

Re: [Patch] Patch set for regex instantiation

2014-06-29 Thread Daniel Krügler
2014-06-29 20:47 GMT+02:00 Tim Shen timshe...@gmail.com: On Sun, Jun 29, 2014 at 10:18 AM, Jonathan Wakely jwak...@redhat.com wrote: Alternatively, we could just make them local statics instead of member data and still remove the duplciation (see attached). This is a good idea. Can we use

Re: [patch] libstdc++/61374 fix string_view conversion and update to latest draft

2014-06-01 Thread Daniel Krügler
2014-06-01 19:24 GMT+02:00 Jonathan Wakely jwak...@redhat.com: Tested x86_64-linux, committed to trunk. This should probably go on the 4.9 branch too, although we could leave the old default cosntructor semantics and just fix the conversion operator. Looking at the comparison functions of

Re: [patch] simplify bits/uses_allocator.h

2014-06-01 Thread Daniel Krügler
2014-06-02 0:35 GMT+02:00 Jonathan Wakely jwak...@redhat.com: 2014-06-01 Jonathan Wakely jwak...@redhat.com * include/bits/uses_allocator.h (__uses_allocator_helper): Simplify. (__uses_allocator_arg): Remove unused type. (__uses_alloc0): Turn into a trivial type.

Re: [patch] simplify bits/uses_allocator.h

2014-06-01 Thread Daniel Krügler
2014-06-02 0:50 GMT+02:00 Jonathan Wakely jwak...@redhat.com: On 02/06/14 00:46 +0200, Daniel Krügler wrote: Some of the changes remove the explicit access-specifier (public) from base classes, such as : public false_type = : false_type In the affected examples this does not introduce

Re: [PATCH, libstdc++/61166] overflow when parse number in std::duration operator

2014-05-14 Thread Daniel Krügler
2014-05-14 15:38 GMT+02:00 Ed Smith-Rowland 3dw...@verizon.net: Make the machinery in bits/parse_number.h unsigned long long. I had actually noticed this a while back but we were in stage 4. Then I forgot.. :-/ Built and tested on x84_64-linux. OK? I understand the reason why the

  1   2   >