pybind11 icon indicating copy to clipboard operation
pybind11 copied to clipboard

[BUG]: Possibly missing `#include <cstdint>` in the `pybind11.h` and `attr.h`

Open andriish opened this issue 2 years ago • 2 comments

Required prerequisites

  • [X] Make sure you've read the documentation. Your issue may be addressed there.
  • [X] Search the issue tracker and Discussions to verify that this hasn't already been reported. +1 or comment there if it has.
  • [X] Consider asking first in the Gitter chat room or in a Discussion.

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

master

Problem description

Possibly missing #include <cstdint> in the pybind11.h and attr.h. The mentioned headers do use e.g. std::uint_16, but don't include <cstdint> standard header. It is not clear if that is an intended omission.

Reproducible example code

None.

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

Not a regression

andriish avatar Jun 16 '23 11:06 andriish

I am also affected. nmslib on latest commit (and modified to request pybind 2.11.1) fails to build due to missing std::uint16_t. Applying the above fix allows it to compile without issues.

Both gcc and clang are affected.

$ clang --version
clang version 16.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

$ gcc --version
gcc (GCC) 13.2.1 20230801

GatienDoesStuff avatar Jan 24 '24 10:01 GatienDoesStuff