fix: use OVERRIDE instead of OVERLOAD (#2490)
* fix: use OVERRIDE instead of OVERLOAD
* docs: more accurate statement
diff --git a/tests/test_factory_constructors.cpp b/tests/test_factory_constructors.cpp
index dcfabac..2368dab 100644
--- a/tests/test_factory_constructors.cpp
+++ b/tests/test_factory_constructors.cpp
@@ -89,7 +89,7 @@
PyTF6(const PyTF6 &f) : TestFactory6(f) { print_copy_created(this); }
PyTF6(std::string s) : TestFactory6((int) s.size()) { alias = true; print_created(this, s); }
~PyTF6() override { print_destroyed(this); }
- int get() override { PYBIND11_OVERLOAD(int, TestFactory6, get, /*no args*/); }
+ int get() override { PYBIND11_OVERRIDE(int, TestFactory6, get, /*no args*/); }
};
class TestFactory7 {
@@ -110,6 +110,7 @@
PyTF7(PyTF7 &&f) : TestFactory7(std::move(f)) { print_move_created(this); }
PyTF7(const PyTF7 &f) : TestFactory7(f) { print_copy_created(this); }
~PyTF7() override { print_destroyed(this); }
+ int get() override { PYBIND11_OVERRIDE(int, TestFactory7, get, /*no args*/); }
};
diff --git a/tests/test_virtual_functions.cpp b/tests/test_virtual_functions.cpp
index baea1e5..4fc04ac 100644
--- a/tests/test_virtual_functions.cpp
+++ b/tests/test_virtual_functions.cpp
@@ -159,7 +159,7 @@
struct DispatchIssue : Base {
std::string dispatch() const override {
- PYBIND11_OVERLOAD_PURE(std::string, Base, dispatch, /* no arguments */);
+ PYBIND11_OVERRIDE_PURE(std::string, Base, dispatch, /* no arguments */);
}
};