Skip to content

Commit

Permalink
Tolerate 80-bit long double in <xlocnum> (#4032)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanTLavavej committed Sep 21, 2023
1 parent e934ec1 commit 1c928ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stl/inc/xlocnum
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,9 @@ protected:

virtual _InIt __CLR_OR_THIS_CALL do_get(_InIt _First, _InIt _Last, ios_base& _Iosbase, ios_base::iostate& _State,
long double& _Val) const { // get long double from [_First, _Last) into _Val
static_assert(sizeof(double) == sizeof(long double), "Bad assumption: sizeof(double) == sizeof(long double).");
// Assumes sizeof(double) == sizeof(long double).
// For 80-bit long double (which is not supported by MSVC in general), this will compile
// but will not attempt to handle the increased precision at runtime.
double _Result;
_First = num_get::do_get(_First, _Last, _Iosbase, _State, _Result); // avoid virtual call for perf
_Val = _Result;
Expand Down

0 comments on commit 1c928ac

Please sign in to comment.