Opened 7 years ago
Closed 7 years ago
#11623 closed Bugs (fixed)
Clang rejects some simple BOOST_TEST() statements
Reported by: | Owned by: | Raffi Enficiaud | |
---|---|---|---|
Milestone: | Boost 1.60.0 | Component: | test |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | BOOST_TEST, double, float, clang, mutable | Cc: |
Description
Thanks again for the new BOOST_TEST() tool, which looks very useful.
Unfortunately, I'm unable to compile the following under clang++
(with or without -std=c++11
) :
#define BOOST_TEST_MODULE comp_doub_mod #include <boost/test/included/unit_test.hpp> BOOST_AUTO_TEST_CASE( comp_doubs ) { const double num { 1.0 }; BOOST_TEST( num == 1.0 ); // BOOST_TEST( 1.0 == num ); }
This also fails if I swap to the commented-out BOOST_TEST() line.
The core of the error message is:
[...]/boost/test/tools/floating_point_comparison.hpp:259:25: error: 'mutable' cannot be applied to references mutable FPT m_tested_rel_diff; ^
I'll attach the full compiler error output.
Attachments (1)
Change History (8)
by , 7 years ago
Attachment: | clang_compile_errors.err added |
---|
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 |
Assigning to keep track of the change, will close once in master
comment:4 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:5 by , 7 years ago
Status: | new → assigned |
---|
comment:6 by , 7 years ago
Milestone: | To Be Determined → Boost 1.60.0 |
---|
Note:
See TracTickets
for help on using tickets.
clang++ compilation errors