Guard redundant constexpr static member redeclarations for C++17+
Summary
Wrap out-of-class constexpr static data member definitions in numeric_limits_half_impl (Half.h) and numeric_limits_bfloat16_impl (BFloat16.h) with #if EIGEN_COMP_CXXVER < 17 guards.
Since C++17, constexpr static data members are implicitly inline, making these definitions redundant and deprecated. This eliminates 46 -Wdeprecated warnings when building with C++17 or later.
Testing
- GCC 15.2.0 with
-std=c++20 -Wdeprecated: 0 warnings (was 46) - GCC 15.2.0 with
-std=c++14 -Wdeprecated: 0 warnings (unchanged) -
half_floattest: pass -
bfloat16_floattest: pass -
cxx11_tensor_scantest: pass
Closes #3061 (closed)
Related to #3015 (closed)