Factor out readable function signatures to avoid duplication (#5857)

* Centralize readable function signatures to avoid duplication

This seems to reduce size costs of adding enum_-specific implementations of dunder methods, but also should provide a nice to have size optimization for programs that use pybind11 in general.

* gate disabling of -Wdeprecated-redundant-constexpr-static-def to clang 17+

* fix gating to include Apple Clang 15

* Make GCC happy with types

* fix apple clang gating again. suppress -Wdeprecated for GCC

* Gate warning suppressions to C++17. Suppress -Wdeprecated for clang as well.

* hopefully fix last straggler CI job

* attempt to address readability review feedback from @rwgk

* drop warning suppressions and instead just gate compilation the pre-C++17 compat code
1 file changed