diff --git a/example/example-virtual-functions.cpp b/example/example-virtual-functions.cpp
index 5d2c9c32..b24925f5 100644
--- a/example/example-virtual-functions.cpp
+++ b/example/example-virtual-functions.cpp
@@ -228,7 +228,7 @@ class PyB_Tpl : public PyA_Tpl {
public:
using PyA_Tpl::PyA_Tpl; // Inherit constructors (via PyA_Tpl's inherited constructors)
int unlucky_number() override { PYBIND11_OVERLOAD(int, Base, unlucky_number, ); }
- double lucky_number() { PYBIND11_OVERLOAD(double, Base, lucky_number, ); }
+ double lucky_number() override { PYBIND11_OVERLOAD(double, Base, lucky_number, ); }
};
// Since C_Tpl and D_Tpl don't declare any new virtual methods, we don't actually need these (we can
// use PyB_Tpl and PyB_Tpl for the trampoline classes instead):