Silence Clang 10 compiler warnings. Fixes #2225. (#2294)

This commit is contained in:
Florian Apolloner 2020-07-12 14:16:19 +02:00 committed by GitHub
parent 8b9eb964d9
commit fe1392d089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -676,7 +676,7 @@ inline void ignore_unused(const int *) { }
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) (((PATTERN), void()), ...)
#else
using expand_side_effects = bool[];
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) pybind11::detail::expand_side_effects{ ((PATTERN), void(), false)..., false }
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) (void)pybind11::detail::expand_side_effects{ ((PATTERN), void(), false)..., false }
#endif
PYBIND11_NAMESPACE_END(detail)