[{"id":3680744,"web_url":"http://patchwork.ozlabs.org/comment/3680744/","msgid":"<bmm.h5ezlmek5c.gcc.gcc-TEST.redi.38.755.CMT@forge-stage.sourceware.org>","list_archive_url":null,"date":"2025-03-12T17:10:06","subject":"Re: [PATCH v1 0/1] libstdc++: Simplify __memcpyable_iterators concept","submitter":{"id":93210,"url":"http://patchwork.ozlabs.org/api/people/93210/","name":"Jonathan Wakely via Sourceware Forge","email":"forge-bot+redi@forge-stage.sourceware.org"},"content":"Pushed as d456728667ddace4cf34ac7a5e63cb67de4c6257\n\n--\nhttps://forge.sourceware.org/gcc/gcc-TEST/pulls/38#issuecomment-755","headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org; dmarc=none (p=none dis=none)\n header.from=forge-stage.sourceware.org","sourceware.org;\n spf=pass smtp.mailfrom=forge-stage.sourceware.org","server2.sourceware.org;\n arc=none smtp.remote-ip=38.145.34.39"],"Received":["from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g16Z72S1vz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 04:04:47 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 5CF4B4BAD156\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 18:04:45 +0000 (GMT)","from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39])\n by sourceware.org (Postfix) with ESMTPS id 30BE74B920F1\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 18:02:23 +0000 (GMT)","from forge-stage.sourceware.org (localhost [IPv6:::1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)\n (No client certificate requested)\n by forge-stage.sourceware.org (Postfix) with ESMTPS id 9724142C19\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 18:01:41 +0000 (UTC)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 5CF4B4BAD156","OpenDKIM Filter v2.11.0 sourceware.org 30BE74B920F1"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 30BE74B920F1","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 30BE74B920F1","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776880943; cv=none;\n b=lX/XaY07TNEvqMldbHq5F8STMDnze7Gcq3eyotteBT7jYQun1Rq5ULd69P2FKI/OozK8wwLq3doj5lF5yYwBxo+IFf4PndyDSK9mr5lXA4GTVL9cPOcj8p0p6DEt1+hiA6ZYy8tazJUylh2QyePDwbmUE5XKpQ4frBShtFrIAQM=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776880943; c=relaxed/simple;\n bh=qMJ6LQnrQsG4MWMYtqeau0KKVw3pDvXHahx0POCC+/8=;\n h=Subject:From:To:Date:Message-ID:MIME-Version;\n b=ObaM+TFm6swtPlVTQQhZeVzk6t7i7+k8ARipx8l3axezs7DjYRhqgFHQAqmysn/D2KNrq0AhaIN0l3ZNePE/3b/71BfiOULS6p4CRtmrL5m/wxNxkqEZqECSCMZYR+VjbKAmlTR0/dp7SceLCKmRvS1Oid3R9gMqnEn7MPI8kLY=","ARC-Authentication-Results":"i=1; server2.sourceware.org","Subject":"Re: [PATCH v1 0/1] libstdc++: Simplify __memcpyable_iterators concept","From":"Jonathan Wakely via Sourceware Forge\n <forge-bot+redi@forge-stage.sourceware.org>","To":"gcc-patches mailing list <gcc-patches@gcc.gnu.org>","Date":"Wed, 12 Mar 2025 17:10:06 +0000","Message-ID":"\n <bmm.h5ezlmek5c.gcc.gcc-TEST.redi.38.755.CMT@forge-stage.sourceware.org>","In-Reply-To":"\n <bmm.hhuns4iz5m.gcc.gcc-TEST.redi.38.1.0@forge-stage.sourceware.org>","X-Mailer":"batrachomyomachia","X-Pull-Request-Organization":"gcc","X-Pull-Request-Repository":"gcc-TEST","X-Pull-Request":"https://forge.sourceware.org/gcc/gcc-TEST/pulls/38","X-Comment":"https://forge.sourceware.org/gcc/gcc-TEST/pulls/38#issuecomment-755","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","MIME-Version":"1.0","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"}},{"id":3680745,"web_url":"http://patchwork.ozlabs.org/comment/3680745/","msgid":"<bmm.h59dtpk7k0.gcc.gcc-TEST.tkaminsk.38.725.CMT@forge-stage.sourceware.org>","list_archive_url":null,"date":"2025-03-07T15:09:45","subject":"Re: [PATCH v1 0/1] libstdc++: Simplify __memcpyable_iterators concept","submitter":{"id":93223,"url":"http://patchwork.ozlabs.org/api/people/93223/","name":"tkaminsk via Sourceware Forge","email":"forge-bot+tkaminsk@forge-stage.sourceware.org"},"content":"@redi wrote in https://forge.sourceware.org/gcc/gcc-TEST/pulls/38#issuecomment-720:\n\n> It's a trade off, but I think keeping each of those tests independent and self-contained has benefits, which might outweigh removing duplication between tests. If it was code in headers that we ship to users, I'd definitely want to remove duplication. For tests, I'm less concerned.\n\nMakes sense, thanks for explanation.\n\n\n--\nhttps://forge.sourceware.org/gcc/gcc-TEST/pulls/38#issuecomment-725","headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org; dmarc=none (p=none dis=none)\n header.from=forge-stage.sourceware.org","sourceware.org;\n spf=pass smtp.mailfrom=forge-stage.sourceware.org","server2.sourceware.org;\n arc=none smtp.remote-ip=38.145.34.39"],"Received":["from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g16Zt57Kqz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 04:05:26 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id E3BEB4B92093\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 18:05:24 +0000 (GMT)","from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39])\n by sourceware.org (Postfix) with ESMTPS id 2DB404B920E4\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 18:02:23 +0000 (GMT)","from forge-stage.sourceware.org (localhost [IPv6:::1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)\n (No client certificate requested)\n by forge-stage.sourceware.org (Postfix) with ESMTPS id 865EF42C18\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 18:01:41 +0000 (UTC)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org E3BEB4B92093","OpenDKIM Filter v2.11.0 sourceware.org 2DB404B920E4"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 2DB404B920E4","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 2DB404B920E4","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776880943; cv=none;\n b=oYEQcO0d6MnjS8IKkEL2z+q+UOqmIqotWNtQJhaODV0Lu8BJAJ8clzx+s9NVFw8mvrmLd0AHJcaZuTUlyB4JC7OndxGz1uL0vtGsMpssiCA1LCE4bJlQuTB+Jdd+tVhZYUu6gt37Ia8Pz98/yw0J9fbkm4DBMDL6KQRbnWqO6M4=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776880943; c=relaxed/simple;\n bh=1a+zJyRSJ8Yxdb01SX//HR/nB1l2rzvIslpXfLdaiLQ=;\n h=Subject:From:To:Date:Message-ID:MIME-Version;\n b=Wds9mkZcFrp+ZTYhzu5wym6j4JAcJIPIPf8j/ZxgfKDXFJdNKFdBBT4AkDGnPxrbRwlDm12atmjhT14MuwSYX9NvCqUNBkDnxhokvETcYzNy6YQpyLjoqpEZt6cJVuPhPDYKjv5xWIhVzNWllL1bNgk8iyRadwRrc2DmkinqXXo=","ARC-Authentication-Results":"i=1; server2.sourceware.org","Subject":"Re: [PATCH v1 0/1] libstdc++: Simplify __memcpyable_iterators concept","From":"tkaminsk via Sourceware Forge\n <forge-bot+tkaminsk@forge-stage.sourceware.org>","To":"gcc-patches mailing list <gcc-patches@gcc.gnu.org>","Date":"Fri, 07 Mar 2025 15:09:45 +0000","Message-ID":"\n <bmm.h59dtpk7k0.gcc.gcc-TEST.tkaminsk.38.725.CMT@forge-stage.sourceware.org>","In-Reply-To":"\n <bmm.hhuns4iz5m.gcc.gcc-TEST.redi.38.1.0@forge-stage.sourceware.org>","X-Mailer":"batrachomyomachia","X-Pull-Request-Organization":"gcc","X-Pull-Request-Repository":"gcc-TEST","X-Pull-Request":"https://forge.sourceware.org/gcc/gcc-TEST/pulls/38","X-Comment":"https://forge.sourceware.org/gcc/gcc-TEST/pulls/38#issuecomment-725","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"quoted-printable","MIME-Version":"1.0","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"}},{"id":3680746,"web_url":"http://patchwork.ozlabs.org/comment/3680746/","msgid":"<bmm.h59dc4ofi8.gcc.gcc-TEST.redi.38.720.CMT@forge-stage.sourceware.org>","list_archive_url":null,"date":"2025-03-07T14:52:02","subject":"Re: [PATCH v1 0/1] libstdc++: Simplify __memcpyable_iterators concept","submitter":{"id":93210,"url":"http://patchwork.ozlabs.org/api/people/93210/","name":"Jonathan Wakely via Sourceware Forge","email":"forge-bot+redi@forge-stage.sourceware.org"},"content":"A few tests include a `.h` file which lives in the same dir as the test, so can be found with `#include \"foo.h\"` e.g.\n\n```\n$ ls testsuite/22_locale/codecvt/codecvt_unicode.h\ntestsuite/22_locale/codecvt/codecvt_unicode.h\n$ git grep codecvt_unicode.h -- testsuite/\ntestsuite/22_locale/codecvt/codecvt_unicode.cc:#include \"codecvt_unicode.h\"\ntestsuite/22_locale/codecvt/codecvt_unicode_char8_t.cc:#include \"codecvt_unicode.h\"\ntestsuite/22_locale/codecvt/codecvt_unicode_wchar_t.cc:#include \"codecvt_unicode.h\"\n```\n\nWe could do that for `Iter` here, but it's a little less tidy because the three new tests are in separate directories, so they would need to do e.g. `#include \"../bounds_checking_iter.h\"` or `#include \"../copy/bounds_checking_iter.h\"` or something like that.\n\nIt's a trade off, but I think keeping each of those tests independent and self-contained has benefits, which might outweigh removing duplication between tests. If it was code in headers that we ship to users, I'd definitely want to remove duplication. For tests, I'm less concerned.\n\n\n\n--\nhttps://forge.sourceware.org/gcc/gcc-TEST/pulls/38#issuecomment-720","headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org; dmarc=none (p=none dis=none)\n header.from=forge-stage.sourceware.org","sourceware.org;\n spf=pass smtp.mailfrom=forge-stage.sourceware.org","server2.sourceware.org;\n arc=none smtp.remote-ip=38.145.34.39"],"Received":["from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g16bC3Xzfz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 04:05:43 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 815064BBC086\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 18:05:41 +0000 (GMT)","from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39])\n by sourceware.org (Postfix) with ESMTPS id 33C484B920F8\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 18:02:23 +0000 (GMT)","from forge-stage.sourceware.org (localhost [IPv6:::1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)\n (No client certificate requested)\n by forge-stage.sourceware.org (Postfix) with ESMTPS id 7520E42C17\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 18:01:41 +0000 (UTC)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 815064BBC086","OpenDKIM Filter v2.11.0 sourceware.org 33C484B920F8"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 33C484B920F8","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 33C484B920F8","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776880943; cv=none;\n b=wDXtOUOJ5p0ZGeMfgQd8UD5WdhW66JKhQZXvOJw7C0ulWOMNPsGiqblqwzxdqcdRptl17xosx9CNu9P6kRREdhLsv+JAQWfN3MAbSAsxBAKDv/i7zKYI5Vq0CKd0XcmjnT18nmBMAf2jXBkuJJWgS2KZp8WICwrlQ7DPM4PLqXM=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776880943; c=relaxed/simple;\n bh=Rn61iHvHxXmJqzX8PsM9ORPj2GSIcKwY0x+0Wf4LHs0=;\n h=Subject:From:To:Date:Message-ID:MIME-Version;\n b=nUwhEskByoRVCjrPzNnpfnESb3pn2+a7tpkMAl+eK09MN1FPttoG3CAIcKQiit6O2CaKCe2eAIQdqJtDGJlpAN5HSHRojZHr6VoWKGKcyMemOEA/fW443wf7AHDkQRUaVjeoyLoilk2AnUSIaa3iNNirEQb2FlJA0xwVCU0lTnE=","ARC-Authentication-Results":"i=1; server2.sourceware.org","Subject":"Re: [PATCH v1 0/1] libstdc++: Simplify __memcpyable_iterators concept","From":"Jonathan Wakely via Sourceware Forge\n <forge-bot+redi@forge-stage.sourceware.org>","To":"gcc-patches mailing list <gcc-patches@gcc.gnu.org>","Date":"Fri, 07 Mar 2025 14:52:02 +0000","Message-ID":"\n <bmm.h59dc4ofi8.gcc.gcc-TEST.redi.38.720.CMT@forge-stage.sourceware.org>","In-Reply-To":"\n <bmm.hhuns4iz5m.gcc.gcc-TEST.redi.38.1.0@forge-stage.sourceware.org>","X-Mailer":"batrachomyomachia","X-Pull-Request-Organization":"gcc","X-Pull-Request-Repository":"gcc-TEST","X-Pull-Request":"https://forge.sourceware.org/gcc/gcc-TEST/pulls/38","X-Comment":"https://forge.sourceware.org/gcc/gcc-TEST/pulls/38#issuecomment-720","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"quoted-printable","MIME-Version":"1.0","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"}},{"id":3680753,"web_url":"http://patchwork.ozlabs.org/comment/3680753/","msgid":"<bmm.hhuntx7q9y.gcc.gcc-TEST.redi.38.1.SUMMARY@forge-stage.sourceware.org>","list_archive_url":null,"date":"2026-04-22T18:02:12","subject":"[SUMMARY] Re: [PATCH v1 0/1] libstdc++: Simplify\n __memcpyable_iterators concept","submitter":{"id":93210,"url":"http://patchwork.ozlabs.org/api/people/93210/","name":"Jonathan Wakely via Sourceware Forge","email":"forge-bot+redi@forge-stage.sourceware.org"},"content":"This is a summary of discussions relative to the merge request created by Jonathan Wakely (redi) <redi@gcc.gnu.org> titled\nlibstdc++: Simplify __memcpyable_iterators concept\nsince its creation.\n\nDescription: My [P3349R1](https://wg21.link/P3349R1) paper clarifies that we should be able to lower contiguous\niterators to pointers, without worrying about side effects of individual\nincrement or dereference operations.\n\n```\nlibstdc++-v3/ChangeLog:\n\n\t* include/bits/stl_algobase.h (__nothrow_contiguous_iterator):\n\tRemove.\n\t(__memcpyable_iterators): Simplify.\n```\n\nThe full and up to date discussion can be found at https://forge.sourceware.org/gcc/gcc-TEST/pulls/38\n\nThe merge request has been closed without being merged directly on the forge repository.\n\n\nOn 2025-03-07 08:10:59+00:00, (tkaminsk) wrote:\n\nWhen we describe the lowering in the standard we require that `to_address(i + n)` is used, however the implementation currently calls only `i += n`. I do not think that difference between `i + n` and `i += n` is meanigfull, as at least for C++20 we require they to be semantically equivalent. However, `to_address(i + n)` is interesting, as it calls `i.operator->()` which may not throw, but still could terminate.\n\nWhat do you think about updating the lines in the 3 functions that uses the `__memcpyable_iterators` to call:\n```\nstd::to_address(__result += __n);\nstd::to_address(__first += __n);\n``` \n\n\nOn 2025-03-07 13:54:59+00:00, Jonathan Wakely (redi) wrote:\n\n@tkaminsk wrote in https://forge.sourceware.org/gcc/gcc-TEST/pulls/38#issuecomment-710:\n\n> When we describe the lowering in the standard we require that `to_address(i + n)` is used, however the implementation currently calls only `i += n`. I do not think that difference between `i + n` and `i += n` is meanigfull, as at least for C++20 we require they to be semantically equivalent. However, `to_address(i + n)` is interesting, as it calls `i.operator->()` which may not throw, but still could terminate.\n\nGood point, yes. I've added tests that use a contiguous iterator type which has preconditions on which parts of an underlying array it's allowed to access. The iterator type detects advancing it past the allowed range, and detects using `to_address` when it's outside the allowed range. The new tests verify that both sets of checks in the iterator are performed and detect both kinds of errors.\n\n> What do you think about updating the lines in the 3 functions that uses the `__memcpyable_iterators` to call:\n> \n> ```text\n> std::to_address(__result += __n);\n> std::to_address(__first += __n);\n> ```\n\nDone, please take another look.\n\n\nOn 2025-03-07 13:58:15+00:00, (tkaminsk) wrote:\n\nLGTM.\nI considered reducing the duplication between test cases, but the class seem to specific to move to `utils/itertools`. Are there any other place we could use for sharing the code between tests?\n\n\nOn 2025-03-07 14:52:02+00:00, Jonathan Wakely (redi) wrote:\n\nA few tests include a `.h` file which lives in the same dir as the test, so can be found with `#include \"foo.h\"` e.g.\n\n```\n$ ls testsuite/22_locale/codecvt/codecvt_unicode.h\ntestsuite/22_locale/codecvt/codecvt_unicode.h\n$ git grep codecvt_unicode.h -- testsuite/\ntestsuite/22_locale/codecvt/codecvt_unicode.cc:#include \"codecvt_unicode.h\"\ntestsuite/22_locale/codecvt/codecvt_unicode_char8_t.cc:#include \"codecvt_unicode.h\"\ntestsuite/22_locale/codecvt/codecvt_unicode_wchar_t.cc:#include \"codecvt_unicode.h\"\n```\n\nWe could do that for `Iter` here, but it's a little less tidy because the three new tests are in separate directories, so they would need to do e.g. `#include \"../bounds_checking_iter.h\"` or `#include \"../copy/bounds_checking_iter.h\"` or something like that.\n\nIt's a trade off, but I think keeping each of those tests independent and self-contained has benefits, which might outweigh removing duplication between tests. If it was code in headers that we ship to users, I'd definitely want to remove duplication. For tests, I'm less concerned.\n\n\n\n\nOn 2025-03-07 15:09:45+00:00, (tkaminsk) wrote:\n\n@redi wrote in https://forge.sourceware.org/gcc/gcc-TEST/pulls/38#issuecomment-720:\n\n> It's a trade off, but I think keeping each of those tests independent and self-contained has benefits, which might outweigh removing duplication between tests. If it was code in headers that we ship to users, I'd definitely want to remove duplication. For tests, I'm less concerned.\n\nMakes sense, thanks for explanation.\n\n\n\nOn 2025-03-12 17:10:06+00:00, Jonathan Wakely (redi) wrote:\n\nPushed as d456728667ddace4cf34ac7a5e63cb67de4c6257\n\n\nOn 2026-04-22 18:00:48+00:00, Lichenor Forgejo Bot (forge-bot) wrote:\n\n<!-- pr-new-version -->\nVersion 1 of this pull request has been stored. It includes the following commits:\n- libstdc++: Simplify __memcpyable_iterators concept - d8b1644caadc53641de5c970761be157c8a9ab8f\n\n\n\nOn 2026-04-22 18:01:40+00:00, Lichenor Forgejo Bot (forge-bot) wrote:\n\nSent patch series version 1 containing 1 patches to gcc-patches mailing list <gcc-patches@gcc.gnu.org>.\n[Cover letter](https://inbox.sourceware.org/gcc-patches/bmm.hhuns4iz5m.gcc.gcc-TEST.redi.38.1.0@forge-stage.sourceware.org)","headers":{"Return-Path":"<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":["incoming@patchwork.ozlabs.org","gcc-patches@gcc.gnu.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","gcc-patches@gcc.gnu.org"],"Authentication-Results":["legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)","sourceware.org; dmarc=none (p=none dis=none)\n header.from=forge-stage.sourceware.org","sourceware.org;\n spf=pass smtp.mailfrom=forge-stage.sourceware.org","server2.sourceware.org;\n arc=none smtp.remote-ip=38.145.34.39"],"Received":["from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g16fC1QcDz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 04:08:19 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 438A14BBC0C5\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 18:08:17 +0000 (GMT)","from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39])\n by sourceware.org (Postfix) with ESMTPS id 5D0564BBC09D\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 18:03:03 +0000 (GMT)","from forge-stage.sourceware.org (localhost [IPv6:::1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)\n (No client certificate requested)\n by forge-stage.sourceware.org (Postfix) with ESMTPS id 09C3E433B4\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 18:02:12 +0000 (UTC)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 438A14BBC0C5","OpenDKIM Filter v2.11.0 sourceware.org 5D0564BBC09D"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 5D0564BBC09D","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 5D0564BBC09D","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776880983; cv=none;\n b=g+y24OiBiGrTnIou5P6aYfq23cIgt2drYGAK1dAqPJNJL6a//7NC93I+9iUs4i3ZWFgwU50P0WA3HrMK/k1pBjGJVEhDsfQklLC8Ua7qrCwTC99PqMdCeGaa58Nl2p0F/BJf+EJwSr1+6/77bX1lm7NEpEE7pwI6Ex8+2bqnPEA=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776880983; c=relaxed/simple;\n bh=8fQ5LmonOguQnrk6dBw/0uom4eDQlVF6u1fssQKJLMI=;\n h=Subject:From:To:Message-ID:MIME-Version:Date;\n b=VgfxqJW8u1WourgCts8Z0kZOYIqnqYW/qDXPDFBs4IZGnfgBDYMrZSDV9NH7gnU1rg3P/MNvfCJNr7TQ6bezlcBs2sn/XmssC8gGEm+jFH22yVxykO+ODuUEnKknKo5/nEGZn8phqVFZlJrH00Jb98yT2ZT3f0f9MV+n3XrH59w=","ARC-Authentication-Results":"i=1; server2.sourceware.org","Subject":"[SUMMARY] Re: [PATCH v1 0/1] libstdc++: Simplify\n __memcpyable_iterators concept","From":"Jonathan Wakely via Sourceware Forge\n <forge-bot+redi@forge-stage.sourceware.org>","To":"gcc-patches mailing list <gcc-patches@gcc.gnu.org>","In-Reply-To":"\n <bmm.hhuns4iz5m.gcc.gcc-TEST.redi.38.1.0@forge-stage.sourceware.org>","Message-ID":"\n <bmm.hhuntx7q9y.gcc.gcc-TEST.redi.38.1.SUMMARY@forge-stage.sourceware.org>","X-Mailer":"batrachomyomachia","X-Pull-Request-Organization":"gcc","X-Pull-Request-Repository":"gcc-TEST","X-Pull-Request":"https://forge.sourceware.org/gcc/gcc-TEST/pulls/38","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"quoted-printable","MIME-Version":"1.0","Date":"Wed, 22 Apr 2026 18:02:12 +0000 (UTC)","X-BeenThere":"gcc-patches@gcc.gnu.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Gcc-patches mailing list <gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>","List-Archive":"<https://gcc.gnu.org/pipermail/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-request@gcc.gnu.org?subject=help>","List-Subscribe":"<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>","Errors-To":"gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"}}]