Skip to content
Snippets Groups Projects
  • Jonathan Wakely's avatar
    21978140
    libstdc++: Only define std::span::at for C++26 [PR115335] · 21978140
    Jonathan Wakely authored
    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.
    21978140
    History
    libstdc++: Only define std::span::at for C++26 [PR115335]
    Jonathan Wakely authored
    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.