-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
Labels:None
-
Fully Compatible
-
ALL
-
v4.2, v4.0
-
Security 2019-11-04
Clang 9 emits the following error:
src/mongo/platform/decimal128_test.cpp:117:26: error: constexpr variable 'expected' must be initialized by a constant expression
constexpr Decimal128 expected(10);
^~~~~~~~~~~~
src/mongo/platform/decimal128.h:179:55: note: member call on object outside its lifetime is not allowed in a constant expression
: Decimal128(v < 0 ? 1 : 0, kExponentBias, 0, _makeCoefficientLow(v)) {}
^
src/mongo/platform/decimal128_test.cpp:117:26: note: in call to 'Decimal128(10)'
constexpr Decimal128 expected(10);