diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index ffd3d4dd3..952bda090 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -1372,7 +1372,7 @@ template template str_attr_accessor object_api::attr_with_type_hint(const char *key) const { #if !defined(__cpp_inline_variables) - static_assert(false, + static_assert(!std::is_same::value, "C++17 feature __cpp_inline_variables not available: " "https://en.cppreference.com/w/cpp/language/static#Static_data_members"); #endif