public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115335] New: std::span at method is missing feature test macro __cpp_lib_span >= 202311L
@ 2024-06-03 21:54 gcc at ebasoft dot com.pl
  2024-06-04 10:04 ` [Bug libstdc++/115335] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gcc at ebasoft dot com.pl @ 2024-06-03 21:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115335

            Bug ID: 115335
           Summary: std::span at method is missing feature test macro
                    __cpp_lib_span >= 202311L
           Product: gcc
           Version: 14.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc at ebasoft dot com.pl
  Target Milestone: ---

gcc (Gentoo 14.1.1_p20240518 p1) 14.1.1 20240516
In gcc stdlibc++ 14 there is method span<>::at added that should be visible
only to standard c++26.
https://en.cppreference.com/w/cpp/container/span/at

But implementation is missing feature test macro
__cpp_lib_span >= 202311L and this method is visible for all standards backward
in c++20 and c++23.
availability in backward standards makes difficult to refactor code for example
from vector to span that will be still portable with older gcc like 13 when it
is being done on platform with gcc libstdc++ 14 as there is no compiler error
when method at is being used after refactoring vector to span.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/115335] std::span at method is missing feature test macro __cpp_lib_span >= 202311L
  2024-06-03 21:54 [Bug c++/115335] New: std::span at method is missing feature test macro __cpp_lib_span >= 202311L gcc at ebasoft dot com.pl
@ 2024-06-04 10:04 ` redi at gcc dot gnu.org
  2024-06-04 14:28 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2024-06-04 10:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115335

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-06-04
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I updated the macro value but seem to have forgotten to check it in <span>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/115335] std::span at method is missing feature test macro __cpp_lib_span >= 202311L
  2024-06-03 21:54 [Bug c++/115335] New: std::span at method is missing feature test macro __cpp_lib_span >= 202311L gcc at ebasoft dot com.pl
  2024-06-04 10:04 ` [Bug libstdc++/115335] " redi at gcc dot gnu.org
@ 2024-06-04 14:28 ` cvs-commit at gcc dot gnu.org
  2024-06-04 14:34 ` cvs-commit at gcc dot gnu.org
  2024-06-04 14:35 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-04 14:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115335

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:2197814011eec75022aa8550f10621409b69d4a1

commit r15-1015-g2197814011eec75022aa8550f10621409b69d4a1
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jun 4 15:06:44 2024 +0100

    libstdc++: Only define std::span::at for C++26 [PR115335]

    In r14-5689-g1fa85dcf656e2f I added std::span::at and made the correct
    changes to the __cpp_lib_span macro (with tests for the correct value in
    C++20/23/26). But I didn't make the declaration of std::span::at
    actually depend on the macro, so it was defined for C++20 and C++23, not
    only for C++26. This fixes that oversight.

    libstdc++-v3/ChangeLog:

            PR libstdc++/115335
            * include/std/span (span::at): Guard with feature test macro.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/115335] std::span at method is missing feature test macro __cpp_lib_span >= 202311L
  2024-06-03 21:54 [Bug c++/115335] New: std::span at method is missing feature test macro __cpp_lib_span >= 202311L gcc at ebasoft dot com.pl
  2024-06-04 10:04 ` [Bug libstdc++/115335] " redi at gcc dot gnu.org
  2024-06-04 14:28 ` cvs-commit at gcc dot gnu.org
@ 2024-06-04 14:34 ` cvs-commit at gcc dot gnu.org
  2024-06-04 14:35 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-04 14:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115335

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:c6e6258ea43299399074f8d5f48697b5bc26064e

commit r14-10281-gc6e6258ea43299399074f8d5f48697b5bc26064e
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jun 4 15:06:44 2024 +0100

    libstdc++: Only define std::span::at for C++26 [PR115335]

    In r14-5689-g1fa85dcf656e2f I added std::span::at and made the correct
    changes to the __cpp_lib_span macro (with tests for the correct value in
    C++20/23/26). But I didn't make the declaration of std::span::at
    actually depend on the macro, so it was defined for C++20 and C++23, not
    only for C++26. This fixes that oversight.

    libstdc++-v3/ChangeLog:

            PR libstdc++/115335
            * include/std/span (span::at): Guard with feature test macro.

    (cherry picked from commit 2197814011eec75022aa8550f10621409b69d4a1)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libstdc++/115335] std::span at method is missing feature test macro __cpp_lib_span >= 202311L
  2024-06-03 21:54 [Bug c++/115335] New: std::span at method is missing feature test macro __cpp_lib_span >= 202311L gcc at ebasoft dot com.pl
                   ` (2 preceding siblings ...)
  2024-06-04 14:34 ` cvs-commit at gcc dot gnu.org
@ 2024-06-04 14:35 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2024-06-04 14:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115335

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.2
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 14.2, thanks for the report.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-06-04 14:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-03 21:54 [Bug c++/115335] New: std::span at method is missing feature test macro __cpp_lib_span >= 202311L gcc at ebasoft dot com.pl
2024-06-04 10:04 ` [Bug libstdc++/115335] " redi at gcc dot gnu.org
2024-06-04 14:28 ` cvs-commit at gcc dot gnu.org
2024-06-04 14:34 ` cvs-commit at gcc dot gnu.org
2024-06-04 14:35 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).