We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddbf53d commit 41a44caCopy full SHA for 41a44ca
tests/test_stl_bind_map.cpp
@@ -1,9 +1,10 @@
1
-#include <nanobind/stl/bind_map.h>
2
-#include <nanobind/stl/string.h>
3
#include <map>
+#include <string>
4
#include <unordered_map>
5
#include <vector>
6
+#include <nanobind/stl/bind_map.h>
7
+
8
namespace nb = nanobind;
9
10
// testing for insertion of non-copyable class
@@ -47,7 +48,7 @@ NB_MODULE(test_bind_map_ext, m) {
47
48
nb::bind_map<std::unordered_map<std::string, double const>>(m,
49
"UnorderedMapStringDoubleConst");
50
- nb::class_<E_nc>(m, "ENC").def(nb::init_implicit<int>()).def_readwrite("value", &E_nc::value);
51
+ nb::class_<E_nc>(m, "ENC").def(nb::init<int>()).def_readwrite("value", &E_nc::value);
52
53
nb::bind_map<std::map<int, E_nc>>(m, "MapENC");
54
m.def("get_mnc", ×_ten<std::map<int, E_nc>>);
0 commit comments