#5729 closed Bugs (fixed)
Missing static_cast in fpt_limits
Reported by: | Paul A. Bristow | Owned by: | Gennadiy Rozental |
---|---|---|---|
Milestone: | Boost 1.59.0 | Component: | test |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | test static_cast floating_point comparison | Cc: |
Description
Using Boost.Test with e_float (in sandbox, which requires always explicit conversion) reveals that a static_cast is missing in struct fpt_limits in floating_point_comparison:
static FPT min_value() {
return std::numeric_limits<FPT>::is_specialized
? (std::numeric_limits<FPT>::min)() : 0;
}
should use
static FPT min_value()
{
return std::numeric_limits<FPT>::is_specialized
? (std::numeric_limits<FPT>::min)() : static_cast<FPT>(0);
}
Oh and there are some tabs :-(
Compiles and seem to work OK with this change.
Change History (4)
comment:1 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 7 years ago
Is there a reason this still hasn't made it to the release version of boost as of 1.58?
comment:4 by , 7 years ago
Milestone: | To Be Determined → Boost 1.59.0 |
---|
(In [75036]) Added missing static cast for non standard FPT Fixes #5729