diff --git a/include/pybind11/common.h b/include/pybind11/common.h index 1ca0d1dbe..19f1f3092 100644 --- a/include/pybind11/common.h +++ b/include/pybind11/common.h @@ -227,7 +227,7 @@ private: NAMESPACE_BEGIN(detail) -static constexpr int log2(size_t n, int k = 0) { return (n <= 1) ? k : log2(n >> 1, k + 1); } +inline static constexpr int log2(size_t n, int k = 0) { return (n <= 1) ? k : log2(n >> 1, k + 1); } inline std::string error_string();