[Boost-bugs] [Boost C++ Libraries] #11623: Clang rejects some simple BOOST_TEST() statements

Subject: [Boost-bugs] [Boost C++ Libraries] #11623: Clang rejects some simple BOOST_TEST() statements
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-09-07 10:07:42


#11623: Clang rejects some simple BOOST_TEST() statements
---------------------------------------------------+---------------------
 Reporter: Tony Lewis <tonyelewis@…> | Owner: rogeeff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
  Version: Boost 1.59.0 | Severity: Problem
 Keywords: BOOST_TEST,double,float,clang,mutable |
---------------------------------------------------+---------------------
 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`) :

 {{{#!cpp
 #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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11623>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC