Re: [PATCH 2/2] libstdc++: add constexpr stable_partition

2025-03-27 Thread Giuseppe D'Angelo
On 27/03/2025 13:24, Jonathan Wakely wrote: Sure thing; is the attached patch OK (on top of the other two)? Yes, looks good, thanks! Thank you, the 3 patches have now been committed to trunk. -- Giuseppe D'Angelo smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH 2/2] libstdc++: add constexpr stable_partition

2025-03-27 Thread Giuseppe D'Angelo
, -- Giuseppe D'Angelo From cdc4ad8e628f68f5c78001828380a2055c539bbe Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Thu, 27 Mar 2025 12:48:26 +0100 Subject: [PATCH] libstdc++: re-bump the feature-test macro for P2562R1 [PR119488] Now that the algorithms have been merged we can adve

[PATCH] libstdc++: do not advertise full P2562R1 support (was: Re: [PATCH 2/2] libstdc++: add constexpr stable_partition)

2025-03-26 Thread Giuseppe D'Angelo
Hello, On 17/03/2025 11:22, Giuseppe D'Angelo wrote: PS: I've noticed that I have already accidentally bumped the FTM for constexpr stable sort; that's a bug as these two last algorithms were not inculded. I can decrement it for the time being, then rebump it again? I didn

Re: [PATCH 2/2] libstdc++: add constexpr stable_partition

2025-03-17 Thread Giuseppe D'Angelo
ue here: https://forge.sourceware.org/gcc/gcc-TEST/pulls/44#issuecomment-792 PS: I've noticed that I have already accidentally bumped the FTM for constexpr stable sort; that's a bug as these two last algorithms were not inculded. I can decrement it for the time being, then rebump it again? Thank

Re: [PATCH 2/2] libstdc++: add constexpr stable_partition

2025-03-15 Thread Giuseppe D'Angelo
Hello, I'm attaching the patch for constexpr stable_partition. Thank you, -- Giuseppe D'Angelo From 08b4984cb9a5b4ed3e904698b4a6997bde3088c3 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sat, 15 Mar 2025 00:15:36 +0100 Subject: [PATCH 2/2] libstdc++: add constexpr s

[PATCH 1/2] libstdc++: add constexpr inplace_merge

2025-03-15 Thread Giuseppe D'Angelo
with some additional comments/questions. This first patch adds support for constexpr inplace_merge, which is relatively easy -- use if consteval to dispatch to a constexpr-friendly implementation. Thank you, -- Giuseppe D'Angelo From 40ae5ace0385ae0136ae1fe6b687aef0582a9348 Mon Sep 17 00:

[PATCH] libstdc++: centralize and improve testing of shared_ptr/weak_ptr conversions

2025-03-15 Thread Giuseppe D'Angelo
Hi, The attached patch is a cleanup and improvement of a test that I've added in r15-8048-gdf0e6509bf7442. Since the test is identical for shared_ptr and weak_ptr, I've centralized it to reduce future maintenance, and extended it to cover more cases. Thank you, -- Giuseppe D&#

Re: [PATCH] libstdc++: implement tuple protocol for std::complex (P2819R2)

2025-03-15 Thread Giuseppe D'Angelo
Hello, On 01/03/2025 16:50, Giuseppe D'Angelo wrote: It's also on Forge here https://forge.sourceware.org/gcc/gcc-TEST/pulls/34 together with a workaround for the ICE (please ignore that, the GCC mirror hasn't synced the proper fix just yet.) This has now been commit

Re: [PATCH] libstdc++: fix compile error when converting std::weak_ptr

2025-03-14 Thread Giuseppe D'Angelo
Hello, On 12/03/2025 18:13, Jonathan Wakely wrote: The newer version of this patch at https://forge.sourceware.org/gcc/gcc-TEST/pulls/35 is OK for trunk, thanks. Thank you for the review. This has now been pushed as r15-8048-gdf0e6509bf7442 , patch attached. -- Giuseppe D'Angelo

Re: [PATCH v2] libstdc++: constrain std::atomic's default constructor

2025-03-08 Thread Giuseppe D'Angelo
Hello, On 03/12/2024 16:53, Giuseppe D'Angelo wrote: Hello, Following the outcome of the previous discussion, the attached revised patch implements the proposed resolution to LWG 4169, moved to WP in Wrocław. https://cplusplus.github.io/LWG/issue4169 Thanks, An amended patch (attached

Re: [PATCH] libstdc++: Fix constexpr memory algo tests for COW std::string

2025-03-06 Thread Giuseppe D'Angelo
... Thank you, -- Giuseppe D'Angelo smime.p7s Description: S/MIME Cryptographic Signature

[PATCH] libstdc++: use if consteval in stable_sort

2025-03-05 Thread Giuseppe D'Angelo
Hi, I'm attaching a very small cleanup for constexpr std::stable_sort, using `if consteval` instead of `__is_constant_evaluated` within a C++26 feature. Thanks, -- Giuseppe D'Angelo From d81ed6c0e5eb8b4bce831217bafdf71c183b1ffa Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angel

[PATCH] libstdc++: implement tuple protocol for std::complex (P2819R2)

2025-03-01 Thread Giuseppe D'Angelo
T/pulls/34 together with a workaround for the ICE (please ignore that, the GCC mirror hasn't synced the proper fix just yet.) Thank you, -- Giuseppe D'Angelo From d2df3bf77ff559a602aafbe7379b293a203cf104 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Thu, 27 Feb 2025 22:47

Re: [PATCH v4] libstdc++: implement constexpr memory algorithms

2025-02-28 Thread Giuseppe D'Angelo
Hello, On 27/02/2025 15:34, Jonathan Wakely wrote: On 26/02/25 17:27 +0100, Giuseppe D'Angelo wrote: On 26/02/2025 16:33, Giuseppe D'Angelo wrote: Whops, sorry, missed this sub-thread (while replying to the other one). Change of plans then, I'll amend and remove the ad-hoc

[PATCH] MAINTAINERS: add myself to write after approval and DCO

2025-02-27 Thread Giuseppe D'Angelo
Hello, I've added myself to MAINTAINERS. Patch is attached. Thank you, -- Giuseppe D'Angelo From a3f77f2528b9383c70f0361e0f3863cee58e9648 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 28 Feb 2025 08:37:25 +0100 Subject: [PATCH] MAINTAINERS: add myself to write aft

Re: [PATCH v3] libstdc++: implement constexpr memory algorithms

2025-02-26 Thread Giuseppe D'Angelo
On 26/02/2025 16:33, Giuseppe D'Angelo wrote: Whops, sorry, missed this sub-thread (while replying to the other one). Change of plans then, I'll amend and remove the ad-hoc constexpr macro. Done, v3 attached. Thanks, -- Giuseppe D'Angelo From de3751a38330f508be9f08b77136a3148

Re: [PATCH] libstdc++: implement constexpr memory algorithms

2025-02-26 Thread Giuseppe D'Angelo
e). Change of plans then, I'll amend and remove the ad-hoc constexpr macro. Thanks, -- Giuseppe D'Angelo smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH v2] libstdc++: implement constexpr memory algorithms

2025-02-26 Thread Giuseppe D'Angelo
since version 14, which is too old to support any C++26 mode, so every Clang that supports -std=c++2c also supports 'if consteval'. I'm not sure if the extra FTM check makes it more readable, but I guess `if consteval` is strictly better than the wrappers, so I'll amend th

Re: [PATCH] libstdc++: implement constexpr memory algorithms

2025-02-25 Thread Giuseppe D'Angelo
Hello, Thanks for the review! On 20/02/2025 17:22, Patrick Palka wrote: On Sun, 16 Feb 2025, Giuseppe D'Angelo wrote: Hello, the attached patch implements the C++26 papers that add `constexpr` to the specialized memory algorithms (the uninitialized_* family). Tested on x86-64 Linux.

[PATCH] libstdc++: implement constexpr memory algorithms

2025-02-16 Thread Giuseppe D'Angelo
Hello, the attached patch implements the C++26 papers that add `constexpr` to the specialized memory algorithms (the uninitialized_* family). Tested on x86-64 Linux. Thank you, -- Giuseppe D'Angelo From 8a4224674bf267c80924a9f69c634f050c3ad590 Mon Sep 17 00:00:00 2001 From: Giuseppe D&#

[PATCH] libstdc++: perfectly forward std::ranges::clamp arguments

2025-01-19 Thread Giuseppe D'Angelo
Hi, the attached patch fixes PR118185 (mentioned in the earlier thread about 118160). Tested on x86-64 Linux. Thanks, -- Giuseppe D'Angelo From 9c61058809ac091335a5e73ad8080d8310e9942e Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sun, 19 Jan 2025 16:30:20 +0100 Subje

Re: [PATCH v2] libstdc++: add a constexpr macro for C++26

2025-01-08 Thread Giuseppe D'Angelo
;something later than C++23" whereas 202400 is more obvious. Good point! New patch attached. Thanks, -- Giuseppe D'Angelo From da28db92930e32cc6f799c731d51f65327a9ebda Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 1 Jan 2025 12:12:29 +0100 Subject: [PATCH] libstdc

Re: [PATCH] libstdc++: add a constexpr macro for C++26

2025-01-08 Thread Giuseppe D'Angelo
ason, just let me know. -- Giuseppe D'Angelo smime.p7s Description: S/MIME Cryptographic Signature

[PATCH] libstdc++: add support for constexpr stable_sort (P2562R1)

2025-01-08 Thread Giuseppe D'Angelo
Hello, This patch adds constexpr to the stable_sort algorithms, implementing P2562R1 for C++26. Tested on x86-64 Linux. Thanks, -- Giuseppe D'Angelo From 951d76ee06abeda932f5c803bfe6d2691403c2e9 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 31 Dec 2024 18:04:45 +01

[PATCH] libstdc++: add a constexpr macro for C++26

2025-01-08 Thread Giuseppe D'Angelo
Hello, The attached patch adds _GLIBCXX26_CONSTEXPR, in preparation for adding `constexpr` on some functions starting in C++26. Thanks, -- Giuseppe D'Angelo From 61115549376a29558eb7753f525daf671c6da929 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 1 Jan 2025 12:1

Re: [PATCH v4] libstdc++: fix a dangling reference crash in ranges::is_permutation

2024-12-23 Thread Giuseppe D'Angelo
rwise LGTM! D'oh. Fourth time the charm... -- Giuseppe D'Angelo From 5d5e7186b927ef85f9e360d3bf9d2a98b9133251 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 20 Dec 2024 12:55:01 +0100 Subject: [PATCH] libstdc++: fix a dangling reference crash in ranges::is_permuta

Re: [PATCH v3] libstdc++: fix a dangling reference crash in ranges::is_permutation

2024-12-21 Thread Giuseppe D'Angelo
permutation_fn): Do not cache the projection result in a local variable, as that may create dangling references. * testsuite/25_algorithms/is_permutation/constrained.cc: Add a test with a range returning prvalues. Signed-off-by: Giuseppe D'Angelo

Re: [PATCH v2] libstdc++: fix a dangling reference crash in ranges::is_permutation

2024-12-20 Thread Giuseppe D'Angelo
Hello, On 20/12/2024 13:23, Giuseppe D'Angelo wrote: Hi, The implementation of ranges::is_permutation may create a dangling reference, which then results (sometimes) in a crash. A minimal example that shows the problem under ASAN is https://gcc.godbolt.org/z/7bP9nE8fK The attached patch

Re: [PATCH v3] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-20 Thread Giuseppe D'Angelo
ore made the test just a compile time one. Thanks, -- Giuseppe D'Angelo From 9036ca04aaf07557c7dc14d995d2a8d4b41d5289 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 3 Dec 2024 16:56:45 +0100 Subject: [PATCH] libstdc++: add initializer_list constructor to std::span (P2447R6) M

Re: [PATCH v2] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-20 Thread Giuseppe D'Angelo
ction. -- Giuseppe D'Angelo smime.p7s Description: S/MIME Cryptographic Signature

[PATCH] libstdc++: fix a dangling reference crash in ranges::is_permutation

2024-12-20 Thread Giuseppe D'Angelo
ative test for this is somehow challenging (how do you test you're not using a dangling reference?), but running the modified test under ASAN shows the fix in place. Do you need me to create a report on bugzilla and cross-reference it from the patch? Thanks, -- Giuseppe D&#

[PATCH] libstdc++: add atomic_ref::address() (P2835R7)

2024-12-19 Thread Giuseppe D'Angelo
Hello, The attached patch builds on top of the previous one, this time adding support for C++26's std::atomic_ref::address(). Tested on x86-64 Linux. Thank you, -- Giuseppe D'Angelo From 0cc16c6e0365308255e02328b0d1f52c0624f8ac Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo

Re: [PATCH v2] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-19 Thread Giuseppe D'Angelo
gned patch. -- Giuseppe D'Angelo From a8be47634a6cb9d26a66ccc43dd22dc928850aa8 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 3 Dec 2024 16:56:45 +0100 Subject: [PATCH] libstdc++: add initializer_list constructor to std::span (P2447R6) MIME-Version: 1.0 Content-Type: text/plain; c

Re: [PATCH v2] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-12 Thread Giuseppe D'Angelo
h the same problem, but I pushed a fix less than an hour ago). Which of course I c&p from. Are there some tests meant to be ran under -Wreorder? Cheers, -- Giuseppe D'Angelo From ccbf0a10faaeb38ee3de1336be53926f021236d0 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue,

Re: [PATCH] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-11 Thread Giuseppe D'Angelo
above is akin to: std::vector getVector(); std::span sp = getVector(); which is also similar to: std::string getString(); std::string_view sv = getString(); and none of these warn at the moment. Thank you, -- Giuseppe D'Angelo smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH] Fix some more is_trivial C++26 deprecation warnings

2024-12-11 Thread Giuseppe D'Angelo
Hello, Giuseppe D'Angelo ha scritto: Hello, This patch fixes a C++26 deprecation warning in g++'s (not libstdc++) autotests. Please ignore; this has been independently fixed in 7aab1271b4afb6f3e9e8a01825fcb14750b29312 (thanks!). Thank you, -- Giuseppe D'Angelo smime.

[PATCH] Fix some more is_trivial C++26 deprecation warnings

2024-12-10 Thread Giuseppe D'Angelo
Hello, This patch fixes a C++26 deprecation warning in g++'s (not libstdc++) autotests. Thanks, -- Giuseppe D'Angelo From c1abe8e7a219e6218478249b93945c96ac81a78a Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 10 Dec 2024 10:49:10 +0100 Subject: [PATCH] Fix some

Re: [PATCH 3/6] libstdc++: port bitwise relocatable away from is_trivial

2024-12-10 Thread Giuseppe D'Angelo
suppressing the warning via #pragmas, however I'm not sure if Clang likes that. What do you think? Thank you, -- Giuseppe D'Angelo smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH v3] Re: libstdc++: use is_virtual_base_of in std::weak_ptr operations

2024-12-09 Thread Giuseppe D'Angelo
Hello, On 04/12/2024 13:20, Giuseppe D'Angelo wrote: Thank you for the review! I think I've incorporated all the changes, new patch is attached. Some other comments... By doing some more testing, I've noticed that this patch causes a build issue when a weak_ptr is used

[PATCH] libstdc++: fix compile error when converting std::weak_ptr

2024-12-09 Thread Giuseppe D'Angelo
s has been already reported somewhere. Tested on x86-64 Linux. Thanks, -- Giuseppe D'Angelo From 2636a2be91fe5a82472068121382a569e0676865 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 10 Dec 2024 00:56:13 +0100 Subject: [PATCH] libstdc++: fix compile error when converti

Re: [PATCH 6/6 v2] libstdc++: deprecate is_trivial (P3247R2)

2024-12-09 Thread Giuseppe D'Angelo
On 09/12/2024 18:43, Jonathan Wakely wrote: On Mon, 9 Dec 2024 at 13:49, Jonathan Wakely wrote: On 09/12/24 13:22 +0100, Giuseppe D'Angelo wrote: Hello, This ports some misc test away from is_trivial. This is fine, thanks. I'm seeing a number of FAILures not fixed by this patch:

Re: [PATCH 2/6] libstdc++: pstl: port away from is_trivial

2024-12-09 Thread Giuseppe D'Angelo
really needed here. Certainly; I've submitted https://github.com/oneapi-src/oneDPL/issues/1961 Thank you, -- Giuseppe D'Angelo smime.p7s Description: S/MIME Cryptographic Signature

[PATCH 2/6] libstdc++: pstl: port away from is_trivial

2024-12-09 Thread Giuseppe D'Angelo
For PSTL, I've just chosen to port from is_trivial to the direct equivalent, as I'm really unsure about the meaning of the code. -- Giuseppe D'Angelo From a24a9495976a08f19df32dddf9b0e29661aca696 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 9 Dec 2024 02

[PATCH 5/6] libstdc++: port tests away from is_trivial

2024-12-09 Thread Giuseppe D'Angelo
Hello, This ports some misc test away from is_trivial. Thanks, -- Giuseppe D'Angelo From 7b0548ee8732b5211a50cba7781b4fe25d9f5f04 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 9 Dec 2024 02:44:30 +0100 Subject: [PATCH 5/6] libstdc++: port tests away from is_t

[PATCH 6/6] libstdc++: deprecate is_trivial (P3247R2)

2024-12-09 Thread Giuseppe D'Angelo
Hello, Finally, this commit deprecates is_trivial and is_trivial_v in C++26. Thanks, -- Giuseppe D'Angelo From 976ad3ec85cdd6fbd6eea7495077ef5b602cf088 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 9 Dec 2024 01:28:08 +0100 Subject: [PATCH 6/6] libstdc++: deprecate

[PATCH 4/6] libstdc++: port the ranges::uninitialized_* algorithms away from is_trivial

2024-12-09 Thread Giuseppe D'Angelo
Hello, The range-based uninitialized_* algorithm have codepaths that turn constructions into assignments if the output type is trivial. Change this detection to be more accurate. There's a couple of cases which are suspicious and deserve accurate reasoning. Thanks, -- Giuseppe D'A

[PATCH 3/6] libstdc++: port bitwise relocatable away from is_trivial

2024-12-09 Thread Giuseppe D'Angelo
Hello, This aligns __is_bitwise_relocatable with its modern meaning, that is, checking for trivial move construction and destruction. Thanks, -- Giuseppe D'Angelo From 0666e993066818ab0940c61d8d9539e883848b29 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 9 Dec 202

[PATCH 1/6] libstdc++: port away from is_trivial in string classes

2024-12-09 Thread Giuseppe D'Angelo
possible, to more specific checks (as "is_trivially_copyable" is a check which suffers from the same flaws of "is_trivial"). I've split the work in multiple smaller commits for ease of review (and amendment in case I get something wrong).

[PATCH] libstdc++: add support for cv-qualified types in atomic_ref (P3323R1)

2024-12-09 Thread Giuseppe D'Angelo
class (__atomic_ref_base) that contains the non-mutating operations. __atomic_ref inherits from _base and adds the mutating operations if T is non const. Thanks, -- Giuseppe D'Angelo From c75e170548dd40c58940cb18d05f413c76d21d34 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 9 De

[PATCH v2] Re: libstdc++: use is_virtual_base_of in std::weak_ptr operations

2024-12-04 Thread Giuseppe D'Angelo
On 03/12/2024 18:02, Jonathan Wakely wrote: On Tue, 3 Dec 2024 at 16:56, Jonathan Wakely wrote: On Tue, 3 Dec 2024 at 16:19, Giuseppe D'Angelo wrote: Hello, The attached patch changes std::weak_ptr "converting move constructor/assignment" -- that is, from a rvalue weak_pt

libstdc++: use is_virtual_base_of in std::weak_ptr operations

2024-12-03 Thread Giuseppe D'Angelo
s far as I know, no ABI requires dereferencing the pointer in the non-virtual inheritance case. Thanks, -- Giuseppe D'Angelo From c67349ec3ac53573a5a36edeedaea9e8f5e41c97 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 2 Oct 2024 18:14:34 +0200 Subject: [PATCH] libstdc

[PATCH] libstdc++: add initializer_list constructor to std::span (P2447)

2024-12-03 Thread Giuseppe D'Angelo
(std::span); f({1, 2, 3}); which is completely fine as the lifetime of the initializer_list encompasses the one of the std::span parameter. However GCC complains about the risk of dangling here. I've therefore disabled the warning for the new constructor. Thanks, -- Giuseppe D'A

Re: [PATCH v2] libstdc++: constrain std::atomic's default constructor

2024-12-03 Thread Giuseppe D'Angelo
Hello, Following the outcome of the previous discussion, the attached revised patch implements the proposed resolution to LWG 4169, moved to WP in Wrocław. https://cplusplus.github.io/LWG/issue4169 Thanks, -- Giuseppe D'Angelo From 3dc64d830c61a16c2c4c0722a3983054aad1b04e Mon Sep 17

Re: [PATCH v4] libstdc++: implement concatenation of strings and string_views

2024-10-17 Thread Giuseppe D'Angelo
e existing code or can liberally apply refactorings to code meant to be compatible only with the latest standards (such as new features), any advice is appreciated :) Thank you, -- Giuseppe D'Angelo smime.p7s Description: Firma crittografica S/MIME

Re: [PATCH v4] libstdc++: implement concatenation of strings and string_views

2024-10-13 Thread Giuseppe D'Angelo
. (Just for the record, these had been C&P from the corresponding operator+ overloads that deal with const char *.) Thanks, -- Giuseppe D'Angelo From 19c8c67f81661f41d97ca7c48f5feaf7444d6e48 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 30 Jul 2024 20:09:12 +0200 Subjec

Re: [PATCH] libstdc++: improve std::atomic compatibility with Clang

2024-10-13 Thread Giuseppe D'Angelo
27;ll just ask SG1 and/or possibly submit a LWG issue. Thank you again for the review, -- Giuseppe D'Angelo smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH 1/2 v3] Introduce __builtin_is_virtual_base_of

2024-10-01 Thread Giuseppe D'Angelo
Hello, Attaching an updated patch. Thank you, -- Giuseppe D'Angelo From 14f433c3ab7e9f14f9b0ce8efc56871bfb780928 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 29 Jul 2024 17:43:20 +0200 Subject: [PATCH] Introduce __builtin_is_virtual_base_of P2985R0 (C++26) intr

Re: [PATCH 1/2 v2] Introduce __builtin_is_virtual_base_of

2024-09-26 Thread Giuseppe D'Angelo
r{base_type} and +@var{derived_type} are ignored. We might mention here that this ignores access and ambiguity. Will add. This was adapted from __is_base_of's docs; do you want me to add the same remark there? Thanks, -- Giuseppe D'Angelo smime.p7s Description: Firma crittografica S/MIME

Re: [PATCH v3] libstdc++: implement concatenation of strings and string_views

2024-09-21 Thread Giuseppe D'Angelo
_Alloc> i.e. use [[nodiscard]] not the NODISCARD macro, and constexpr instead of the CONSTEXPR macro and the inline keyword. Here's a rebased patch that also includes these changes. Thank you, -- Giuseppe D'Angelo From fd5570abc94503cadcaa236db1bfa7c5e6cfc404 Mon Sep 17 00:00:00 2001

[PATCH] libstdc++: improve std::atomic compatibility with Clang

2024-09-21 Thread Giuseppe D'Angelo
default constructor is not constrained, so it should be `true`. Right now we're reporting `false` instead. Thoughts? Thank you, -- Giuseppe D'Angelo From 274543f82ac4e77aaf9c8f5158a44b98538537e5 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sat, 21 Sep 2024 10:36:20

Re: [PATCH v2] libstdc++: add default template parameters to algorithms

2024-09-16 Thread Giuseppe D'Angelo
if LWG would like to have a look and approve the final result. P2248R8 contains a note to this end, but it wasn't acted upon: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2248r8.html#iterators Regards, -- Giuseppe D'Angelo smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH] libstdc++: Do not use use memmove for 1-element ranges [PR108846, PR116471]

2024-09-13 Thread Giuseppe D'Angelo
Hello, Thank you for the review! Il 13/09/24 10:49, Jonathan Wakely ha scritto: But I can make these minor changes locally and push it if you want - there's no need for a v2 patch. I'd gladly take this offer, please feel free to amend as needed and push :) Cheers, -- Giusepp

[PATCH] libstdc++: hashing support for chrono value classes (P2592R2)

2024-09-04 Thread Giuseppe D'Angelo
roll something à la Boost.HashCombine / P0814? Not only it's likely to be cheaper, but it would also be more constexpr-friendly, in preparation of constexpr std::hash (P3372). As usual, any feedback is appreciated :) Thank you, -- Giuseppe D'Angelo From 7f1c88139c2b906982cb036f39bfa80db122c7af

[PATCH] libstdc++: Do not use use memmove for 1-element ranges [PR108846, PR116471]

2024-08-30 Thread Giuseppe D'Angelo
e). Thank you, -- Giuseppe D'Angelo From 1b75da8e2514e01a7b54117c63facbf0f3b49a88 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 23 Aug 2024 15:05:54 +0200 Subject: [PATCH] libstdc++: Do not use use memmove for 1-element ranges [PR108846,PR116471] This commit ports the

Re: [PATCH 1/2 v2] Introduce __builtin_is_virtual_base_of

2024-08-30 Thread Giuseppe D'Angelo
Hello, On 31/07/2024 00:49, Giuseppe D'Angelo wrote: On 29/07/2024 22:53, Giuseppe D'Angelo wrote: Hi, The attached patch is a stab at adding the necessary compiler builtin to support std::is_virtual_base_of (P2985R0, approved for C++26). The name of the builtin matches the one j

Re: [PATCH v2] libstdc++: add default template parameters to algorithms

2024-08-02 Thread Giuseppe D'Angelo
Hello, as usual thank you for the review. V2 is attached. On 02/08/2024 14:38, Jonathan Wakely wrote: On Fri, 2 Aug 2024 at 13:17, Jonathan Wakely wrote: On Fri, 2 Aug 2024 at 11:45, Giuseppe D'Angelo wrote: Hello, The attached patch adds support for P2248R8 + P3217R0 (Enabling

[PATCH] libstdc++: add default template parameters to algorithms

2024-08-02 Thread Giuseppe D'Angelo
Hello, The attached patch adds support for P2248R8 + P3217R0 (Enabling list-initialization for algorithms, C++26). The big question is whether this keeps the code readable enough without introducing too much #ifdef-ery, so any feedback is appreciated. Thanks, -- Giuseppe D'Angelo

Re: [PATCH 2/2 v3] libstdc++: add std::is_virtual_base_of

2024-08-02 Thread Giuseppe D'Angelo
Hello, On 31/07/2024 00:55, Jonathan Wakely wrote: If __cpp_lib_is_virtual_base_of depends on __has_builtin, then that will do the right thing for #ifdef __cpp_lib_is_virtual_base_of in . Third time's the charm, I hope; clang trunk seems to like this. Thank you, -- Giuseppe D'A

Re: [PATCH 2/2 v2] libstdc++: add std::is_virtual_base_of

2024-07-30 Thread Giuseppe D'Angelo
Hello, On 30/07/2024 15:04, Jonathan Wakely wrote: On Mon, 29 Jul 2024 at 21:58, Giuseppe D'Angelo wrote: Hi, And this is the corresponding change libstdc++. Thanks for the patch. Again, thanks for the guidance, should be all fixed. -- Giuseppe D'A

Re: [PATCH 1/2 v2] Introduce __builtin_is_virtual_base_of

2024-07-30 Thread Giuseppe D'Angelo
On 29/07/2024 22:53, Giuseppe D'Angelo wrote: Hi, The attached patch is a stab at adding the necessary compiler builtin to support std::is_virtual_base_of (P2985R0, approved for C++26). The name of the builtin matches the one just merged into clang: https://github.com/llvm/llvm-project/i

Re: [PATCH v2] libstdc++: implement concatenation of strings and string_views

2024-07-30 Thread Giuseppe D'Angelo
On 30/07/2024 15:27, Jonathan Wakely wrote: On Tue, 30 Jul 2024 at 14:08, Jonathan Wakely wrote: On Tue, 30 Jul 2024 at 08:31, Giuseppe D'Angelo wrote: Hello! The attached patch implements adds support for P2591R5 in libstdc++ (concatenation of strings and string_views, approved in

[PATCH] libstdc++: implement concatenation of strings and string_views

2024-07-30 Thread Giuseppe D'Angelo
Hello! The attached patch implements adds support for P2591R5 in libstdc++ (concatenation of strings and string_views, approved in Tokyo for C++26). Thank you, -- Giuseppe D'Angelo From 0a4d44196bced41d97d8086343786b52a6f75faf Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Dat

[PATCH 2/2] libstdc++: add std::is_virtual_base_of

2024-07-29 Thread Giuseppe D'Angelo
Hi, And this is the corresponding change libstdc++. Thank you, -- Giuseppe D'Angelo From c81392a11834b9ccbe476c280915c9a4fbf64d6d Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 29 Jul 2024 19:23:54 +0200 Subject: [PATCH 2/2] libstdc++: add std::is_virtual_base_of

[PATCH 1/2] Introduce __builtin_is_virtual_base_of

2024-07-29 Thread Giuseppe D'Angelo
++ bits. -- Giuseppe D'Angelo From 0390df2a40e68b6624462fa33f666d7de0c621c2 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 29 Jul 2024 17:43:20 +0200 Subject: [PATCH 1/2] Introduce __builtin_is_virtual_base_of P2985R0 (C++26) introduces std::is_virtual_base_of; this is th