Subject: [Boost-bugs] [Boost C++ Libraries] #8679: Boost.Test pollutes boost namespace with it's own enable_if/disable_if templates
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-09 12:06:28
#8679: Boost.Test pollutes boost namespace with it's own enable_if/disable_if
templates
-------------------------------------+-------------------------
Reporter: johnmaddock | Owner: rogeeff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
Version: Boost Development Trunk | Severity: Showstopper
Keywords: |
-------------------------------------+-------------------------
The following test program:
{{{
#define BOOST_TEST_MODULE my_test
#include <boost/multiprecision/cpp_dec_float.hpp>
#define BOOST_TEST_MAIN
#include <boost/test/included/unit_test.hpp> // Note: header-only
Boost.Test
#include <boost/test/floating_point_comparison.hpp>
BOOST_AUTO_TEST_CASE(my_test)
{
typedef
boost::multiprecision::number<boost::multiprecision::cpp_dec_float<50>,
boost::multiprecision::et_off>
mp_type;
const mp_type test_value = mp_type(12) / 7;
}
}}}
Fails to compile due to ambiguities between boost::enable_if and
boost::unit_test::decorator::disable_if:
{{{
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(118): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1> d:\data\boost\trunk\boost\type_traits\is_convertible.hpp(484)
: see reference to class template instantiation
'boost::multiprecision::number<Backend>' being compiled
1> with
1> [
1> Backend=boost::multiprecision::backends::cpp_dec_float<50>
1> ]
1>
d:\data\boost\trunk\boost\multiprecision\detail\no_et_ops.hpp(455) : see
reference to class template instantiation 'boost::is_convertible<From,To>'
being compiled
1> with
1> [
1> From=__int64,
1>
To=boost::multiprecision::number<boost::multiprecision::backends::cpp_dec_float<50>>
1> ]
1> d:\data\boost\trunk\ide\math\scrap\scrap.cpp(38) : see
reference to function template instantiation
'boost::multiprecision::number<Backend,ExpressionTemplates>
boost::multiprecision::operator
/<boost::multiprecision::backends::cpp_dec_float<Digits10>,int>(boost::multiprecision::number<Backend,ExpressionTemplates>
&&,const V &)' being compiled
1> with
1> [
1>
Backend=boost::multiprecision::backends::cpp_dec_float<50>,
1> ExpressionTemplates=et_off,
1> Digits10=50,
1> V=int
1> ]
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(118): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(118): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(118): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(124): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(124): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(124): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(124): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(131): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(131): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(153): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(153): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(168): error C2872:
'disable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(59)
: boost::disable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(197) :
boost::unit_test::decorator::disable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(168): error C2872:
'disable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(59)
: boost::disable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(197) :
boost::unit_test::decorator::disable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(237): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(237): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(268): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(268): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(312): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(312): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(343): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(343): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(391): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(391): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(400): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(400): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(431): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(431): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(465): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(465): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(500): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(500): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(533): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(533): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(661): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(661): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(1637): error C2872:
'disable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(59)
: boost::disable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(197) :
boost::unit_test::decorator::disable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(1637): error C2872:
'disable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(59)
: boost::disable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(197) :
boost::unit_test::decorator::disable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(1640): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
1>d:\data\boost\trunk\boost\multiprecision\number.hpp(1640): error C2872:
'enable_if' : ambiguous symbol
1> could be 'd:\data\boost\trunk\boost\utility\enable_if.hpp(36)
: boost::enable_if'
1> or
'd:\data\boost\trunk\boost\test\tree\decorator.hpp(184) :
boost::unit_test::decorator::enable_if'
}}}
IMO Boost.Test should not pollute namespace boost with types of the same
name as other types already there.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8679> 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:13 UTC