From 833e22f1a88c153c466dc7f40c2b07ecbc1821d4 Mon Sep 17 00:00:00 2001 From: Mark Glines Date: Wed, 9 Dec 2020 08:15:50 -0500 Subject: [PATCH] Fix python bindings when building with clang++-10 Fix a few instances of this build error in pytaco: .../python_bindings/src/pyTensor.cpp:406:53: error: unknown type name 'nullptr_t'; did you mean 'std::nullptr_t'? --- python_bindings/src/pyTensor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python_bindings/src/pyTensor.cpp b/python_bindings/src/pyTensor.cpp index a23333e14..70dda9d7d 100644 --- a/python_bindings/src/pyTensor.cpp +++ b/python_bindings/src/pyTensor.cpp @@ -403,7 +403,7 @@ static void declareTensor(py::module &m, const std::string typestr) { return elementGetter(self, indices); }, py::is_operator()) - .def("__getitem__", [](typedTensor& self, nullptr_t ptr) -> Access{ + .def("__getitem__", [](typedTensor& self, std::nullptr_t ptr) -> Access{ if(self.getOrder() != 0) { throw py::index_error("Can only index scalar tensors with None."); } @@ -417,15 +417,15 @@ static void declareTensor(py::module &m, const std::string typestr) { .def("__getitem__", &accessGetter&>, py::is_operator()) // Set scalars to expression using none - .def("__setitem__", [](typedTensor& self, nullptr_t ptr, const IndexExpr expr) -> void { + .def("__setitem__", [](typedTensor& self, std::nullptr_t ptr, const IndexExpr expr) -> void { self = expr; }, py::is_operator()) - .def("__setitem__", [](typedTensor& self, nullptr_t ptr, const Access access) -> void { + .def("__setitem__", [](typedTensor& self, std::nullptr_t ptr, const Access access) -> void { self = access; }, py::is_operator()) - .def("__setitem__", [](typedTensor& self, nullptr_t ptr, const TensorVar tensorVar) -> void { + .def("__setitem__", [](typedTensor& self, std::nullptr_t ptr, const TensorVar tensorVar) -> void { self = tensorVar; }, py::is_operator())