Skip to content

VS2022 _invalid_parameter #3477

@gearslogy

Description

@gearslogy

Problem description

Not a pybind bug, it should be vs2022 bug

image

solution:

https://www.reddit.com/r/cpp_questions/comments/qpo93t/error_c2039_invalid_parameter_is_not_a_member_of/

in the pybind11.h , Insert this code after line 22 , it can fix the problem

#elif defined(_MSC_VER)
#include <corecrt.h>

Reproducible example code

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions