]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Remove 2 exports [PR121373]
authorJakub Jelinek <jakub@redhat.com>
Tue, 5 Aug 2025 06:27:05 +0000 (08:27 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 5 Aug 2025 06:27:05 +0000 (08:27 +0200)
On Mon, Aug 04, 2025 at 11:33:17AM -0400, Patrick Palka wrote:
> > @@ -1693,6 +1697,8 @@ export namespace std
> >    {
> >      using std::ranges::advance;
> >      using std::ranges::distance;
> > +    using std::ranges::iter_move;
> > +    using std::ranges::iter_swap;
>
> Actually a few lines above we already do:
>
>   // _Cpo is an implementation detail we can't avoid exposing; if we do the
>   // using in ranges directly, it conflicts with any friend functions of the
>   // same name, which is why the customization points are in an inline
>   // namespace in the first place.
>   namespace ranges::inline _Cpo
>   {
>     using _Cpo::iter_move;
>     using _Cpo::iter_swap;
>   }
>
> So I think we don't want to export iter_move and iter_swap directly...  Sorry
> for not catching this sooner :/

Here is a patch which does that.

2025-08-05  Jakub Jelinek  <jakub@redhat.com>

PR libstdc++/121373
* src/c++23/std.cc.in (std::ranges::iter_move, std::ranges::iter_swap):
Remove exports.

libstdc++-v3/src/c++23/std.cc.in

index 2300126a5b13d0e9502f5a317ca3359fd06a7549..405bb6e7c1ceafcc140794b0c3e33dd0dd82b657 100644 (file)
@@ -1697,8 +1697,6 @@ export namespace std
   {
     using std::ranges::advance;
     using std::ranges::distance;
-    using std::ranges::iter_move;
-    using std::ranges::iter_swap;
     using std::ranges::next;
     using std::ranges::prev;
   }