Skip to content

[BUG] std::string::npos not correctly mapped #4268

@phoerious

Description

@phoerious

Describe the bug
libcpp.string.npos maps to std::npos, which doesn't exist and causes a compilation error:

error: ‘npos’ is not a member of ‘std’; did you mean ‘fpos’?

It should map to std::string::npos instead.

Sources:

Wrong:

cdef extern from "<string>" namespace "std" nogil:
    size_t npos = -1

Correct:

cdef extern from "<string>" namespace "std::string" nogil:
    const size_t npos

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions