diff --git a/SConstruct b/SConstruct index 564439397..f0b14ca23 100644 --- a/SConstruct +++ b/SConstruct @@ -805,12 +805,15 @@ help:assume works @_custom_test def _check_type_traits(self,context): f = ''' +#define DXX_INHERIT_CONSTRUCTORS /* bypass sanity check */ #include "compiler-type_traits.h" typedef tt::conditional::type a; typedef tt::conditional::type b; ''' if self.check_cxx11_type_traits(context, f) or self.check_boost_type_traits(context, f): context.sconf.Define('DXX_HAVE_TYPE_TRAITS') + return + raise SCons.Errors.StopError("C++ compiler does not support or Boost.TypeTraits.") @_implicit_test def check_boost_foreach(self,context,**kwargs): """ diff --git a/common/include/compiler-type_traits.h b/common/include/compiler-type_traits.h index 33e951b61..d4e57c9fc 100644 --- a/common/include/compiler-type_traits.h +++ b/common/include/compiler-type_traits.h @@ -6,6 +6,7 @@ */ #pragma once +#ifdef DXX_INHERIT_CONSTRUCTORS #if defined(DXX_HAVE_CXX11_TYPE_TRAITS) #include namespace tt = std; @@ -15,3 +16,6 @@ namespace tt = boost; #else #error "No implementation found." #endif +#else +#error "\"compiler-type_traits.h\" included before \"dxxsconf.h\"" +#endif