cyb70289 commented on a change in pull request #11773:
URL: https://github.com/apache/arrow/pull/11773#discussion_r758884650
##########
File path: cpp/src/arrow/type.cc
##########
@@ -831,7 +831,9 @@ Decimal128Type::Decimal128Type(int32_t precision, int32_t
scale)
Result<std::shared_ptr<DataType>> Decimal128Type::Make(int32_t precision,
int32_t scale) {
if (precision < kMinPrecision || precision > kMaxPrecision) {
- return Status::Invalid("Decimal precision out of range: ", precision);
+ const auto min = kMinPrecision, max = kMaxPrecision;
+ return Status::Invalid("Decimal precision out of range [", min, ", ", max,
+ "]: ", precision);
Review comment:
This issue should have been fixed in C++17.
The workaround in http://ostack.cn/?qa=744640/ looks simpler.
Original post:
https://stackoverflow.com/questions/40690260/undefined-reference-error-for-static-constexpr-member
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]