From 882d20f57fa54cb9499073d52e5b3ae20425905d Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 17 Dec 2024 13:13:34 -0800 Subject: [PATCH] Avoid explicit `false` in `static_assert()`. --- include/pybind11/cast.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index ffd3d4dd34..952bda090c 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