Skip to content

Remove numeric_limits' Dinkumware branches - #90

Merged
jmgilbert2 merged 1 commit into
masterfrom
fix/numeric-limits-msvc
Nov 8, 2026
Merged

jmgilbert2 merged 1 commit into
masterfrom
fix/numeric-limits-msvc

Conversation

@jmgilbert2

Copy link
Copy Markdown
Owner

Removes the last Dinkumware-era code in EASTL: the floating-point numeric_limits branch for cl.

Before

For cl, numeric_limits<float>, <double> and <long double> took their special values from Dinkumware's internals (_CSTD _FInf, _Nan, _Snan, _Denorm and friends, from <ymath.h>), unless MSVC STL was at least its 2022-06 update. From that update on, they already used the same builtins as MSVC STL. Two problems:

  • Unreachable fallback: the Dinkumware path can't be reached with VS 2022 or later.
  • Wrong key: the branch was selected by the library (_CPPLIB_VER), not the compiler.

After

  • cl always uses the builtins (__builtin_huge_val*, __builtin_nan*("0"), __builtin_nans*("1"), *_TRUE_MIN), keyed on EA_COMPILER_MSVC.
  • <ymath.h> and the _CPPLIB_VER/_MSVC_STL_UPDATE checks are gone.
  • clang-cl and GCC keep their existing builtin branch, unchanged.

Verification

🤖 Generated with Claude Code

The floating-point specializations took cl's values from Dinkumware's
internals (_CSTD _FInf and friends, from <ymath.h>) unless MSVC STL was at
least the 2022-06 update, where they already used the builtins MSVC STL
uses. That fallback can't be reached with VS 2022 or later, and the branch
depended on the library (_CPPLIB_VER) rather than the compiler. cl now
always uses the builtins, keyed on EA_COMPILER_MSVC; clang-cl keeps the
GCC/clang branch. The values are bit-identical to before and to MSVC
STL's std::numeric_limits with cl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jmgilbert2
jmgilbert2 merged commit bbed209 into master Nov 8, 2026
13 checks passed
jmgilbert2 added a commit that referenced this pull request Nov 8, 2026
Brings in PRs #89 and #90: EASTL_EXCEPTIONS_ENABLED and EASTL_RTTI_ENABLED
follow EABase (exceptions on unless the compiler has them off, RTTI
unless it's disabled), variant's warnings that only appear with
exceptions enabled are silenced, and numeric_limits loses its Dinkumware
branches. Master's test changes don't apply to this branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant