Commit 1a5bba5
authored
Include cstdlib. (#1218)
nanobind uses std::abs, which is either defined in cstdlib or cmath. We
must include one or the other.
Fixes a build failure in our build environment:
```
In file included from third_party/benchmark/bindings/python/google_benchmark/benchmark.cc:6:
./third_party/nanobind/include/nanobind/operators.h:135:45: error: no member named 'abs' in namespace 'std'; did you mean simply 'abs'?
135 | NB_UNARY_OPERATOR(abs, abs, std::abs(l))
| ^ ~~~
.../llvm_unstable/src/libcxx/include/math.h:456:20: note: 'abs' declared here
456 | using std::__math::abs;
|
```1 parent dc35d69 commit 1a5bba5
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
0 commit comments