EASTL icon indicating copy to clipboard operation
EASTL copied to clipboard

Various numeric_limits functions are not constexpr on MSVC

Open bleachkitty opened this issue 5 years ago • 1 comments

Various functions in numeric_limits are not constexpr on MSVC. For example, the specialization for double ends up in the _CPPLIB_VER clause and none of those functions are constexpr. See numeric_limits.h around line 1422. The C++ 11 standard marks them all as constexpr.

Can we add EA_CONSTEXPR to each these functions? If not, can we have another clause in the #if for MSVC? (I'm happy to do it and make a pull request if you'd prefer).

bleachkitty avatar Mar 12 '20 06:03 bleachkitty

For sure we can update the existing path to make it constexpr. Feel free to submit a PR. Thanks for checking.

rparolin avatar Mar 16 '20 15:03 rparolin