Opened 7 years ago
Closed 7 years ago
#11624 closed Bugs (fixed)
BOOST_TEST( 0.0 == 0.0 ) fails under C++11 (GCC and Clang)
Reported by: | Owned by: | Raffi Enficiaud | |
---|---|---|---|
Milestone: | Boost 1.60.0 | Component: | test |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | BOOST_TEST, zero, C++11, float | Cc: |
Description
Thanks again for the new BOOST_TEST() tool, which looks very useful.
Unfortunately, I'm seeing strange behaviour from the following code under g++ -std=c++11
or clang++ -std=c++11 -stdlib=libc++
:
#define BOOST_TEST_MODULE zero_mod #include <boost/test/included/unit_test.hpp> BOOST_AUTO_TEST_CASE( zero ) { BOOST_TEST( 0.0 == 0.0 ); }
If I compile with -std=c++11
, then the test fails:
error: in "zero": check 0.0 == 0.0 has failed [0 != 0]. Absolute value exceeds tolerance [|0| > 0]
...but I compile without any -std=[...]
option, then the test passes.
Change History (7)
comment:1 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 7 years ago
Thanks for the successful fix in the develop branch. Will this make it into 1.60.0?
comment:3 by , 7 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Reopening to keep track of the merge to releases.
comment:4 by , 7 years ago
Milestone: | To Be Determined → Boost 1.60.0 |
---|
comment:5 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:6 by , 7 years ago
Status: | new → assigned |
---|
Note:
See TracTickets
for help on using tickets.
thx for the report