Skip to content

[BUG]: Typing.h not working with gcc-14 (line 104) #5206

Closed
@97gamjak

Description

@97gamjak

Required prerequisites

What version (or hash if on master) of pybind11 are you using?

v2.13.0 & v2.13.1 & #5203

Problem description

So basically, with tag v 2.13.0 a bug considering the GNU 14 compiler was introduced in typing.h line 104 with std::copy_n

tag v2.12.0 works.

So looking at the changelog of the GNU compiler they state this on how to port the code to gcc-14.

"""
C++ language issues
Header dependency changes
Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library. As such, C++ programs that used standard library components without including the right headers will no longer compile.

The following headers are used less widely in libstdc++ and may need to be included explicitly when compiling with GCC 14:

(for std::copy_n, std::find_if, std::lower_bound, std::remove, std::reverse, std::sort etc.)
...
"""

Reproducible example code

No response

Is this a regression? Put the last known working version here if it is.

v2.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNew bug, unverified

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions