Remove support for Boost.TypeTraits
Boost enable_if works differently from std::enable_if, so the build is broken when using Boost.TypeTraits. The broken code has been present for a long time and no one reported it. Remove the fallback to Boost.
This commit is contained in:
parent
40d4bf4f09
commit
957016621e
10
SConstruct
10
SConstruct
|
@ -1366,12 +1366,6 @@ namespace B
|
||||||
using namespace B;
|
using namespace B;
|
||||||
''', main='return A::a;', msg='whether compiler handles classes from "using namespace"', successflags=_successflags)
|
''', main='return A::a;', msg='whether compiler handles classes from "using namespace"', successflags=_successflags)
|
||||||
@_implicit_test
|
@_implicit_test
|
||||||
def check_boost_type_traits(self,context,f):
|
|
||||||
"""
|
|
||||||
help:assume Boost.TypeTraits works
|
|
||||||
"""
|
|
||||||
return self.Compile(context, text=f, msg='for Boost.TypeTraits', ext='.cpp', successflags={'CPPDEFINES' : ['DXX_HAVE_BOOST_TYPE_TRAITS']})
|
|
||||||
@_implicit_test
|
|
||||||
def check_cxx11_type_traits(self,context,f,_successflags={'CPPDEFINES' : ['DXX_HAVE_CXX11_TYPE_TRAITS']}):
|
def check_cxx11_type_traits(self,context,f,_successflags={'CPPDEFINES' : ['DXX_HAVE_CXX11_TYPE_TRAITS']}):
|
||||||
"""
|
"""
|
||||||
help:assume <type_traits> works
|
help:assume <type_traits> works
|
||||||
|
@ -1385,9 +1379,9 @@ help:assume <type_traits> works
|
||||||
typedef tt::conditional<true,int,long>::type a;
|
typedef tt::conditional<true,int,long>::type a;
|
||||||
typedef tt::conditional<false,int,long>::type b;
|
typedef tt::conditional<false,int,long>::type b;
|
||||||
'''
|
'''
|
||||||
if self.check_cxx11_type_traits(context, f) or self.check_boost_type_traits(context, f):
|
if self.check_cxx11_type_traits(context, f):
|
||||||
return
|
return
|
||||||
raise SCons.Errors.StopError("C++ compiler does not support <type_traits> or Boost.TypeTraits.")
|
raise SCons.Errors.StopError("C++ compiler does not support <type_traits>.")
|
||||||
@_implicit_test
|
@_implicit_test
|
||||||
def check_boost_foreach(self,context,**kwargs):
|
def check_boost_foreach(self,context,**kwargs):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -10,9 +10,6 @@
|
||||||
#if defined(DXX_HAVE_CXX11_TYPE_TRAITS)
|
#if defined(DXX_HAVE_CXX11_TYPE_TRAITS)
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
namespace tt = std;
|
namespace tt = std;
|
||||||
#elif defined(DXX_HAVE_BOOST_TYPE_TRAITS)
|
|
||||||
#include <boost/type_traits.hpp>
|
|
||||||
namespace tt = boost;
|
|
||||||
#else
|
#else
|
||||||
#error "No <type_traits> implementation found."
|
#error "No <type_traits> implementation found."
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue