mirror of
https://github.com/boostorg/config.git
synced 2025-07-29 20:07:17 +02:00
Add BOOST_NO_CXX11_SFINAE_EXPR
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
#
|
||||
# *** DO NOT EDIT THIS FILE BY HAND ***
|
||||
# This file was automatically generated on Mon Dec 12 19:37:08 2016
|
||||
# This file was automatically generated on Sat Feb 4 00:49:07 2017
|
||||
# by libs/config/tools/generate.cpp
|
||||
# Copyright John Maddock.
|
||||
# Use, modification and distribution are subject to the
|
||||
@ -116,6 +116,7 @@ run-simple <define>TEST_BOOST_NO_CXX11_INLINE_NAMESPACES : cxx11_inline_namespac
|
||||
run-simple <define>TEST_BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS : cxx11_non_public_defaulted_functions ;
|
||||
run-simple <define>TEST_BOOST_NO_CXX11_NUMERIC_LIMITS : cxx11_numeric_limits ;
|
||||
run-simple <define>TEST_BOOST_NO_CXX11_REF_QUALIFIERS : cxx11_ref_qualifiers ;
|
||||
run-simple <define>TEST_BOOST_NO_CXX11_SFINAE_EXPR : cxx11_sfinae_expr ;
|
||||
run-simple <define>TEST_BOOST_NO_CXX11_SMART_PTR : cxx11_smart_ptr ;
|
||||
run-simple <define>TEST_BOOST_NO_CXX11_STD_ALIGN : cxx11_std_align ;
|
||||
run-simple <define>TEST_BOOST_NO_CXX11_THREAD_LOCAL : cxx11_thread_local ;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// This file was automatically generated on Mon Dec 12 19:37:08 2016
|
||||
// This file was automatically generated on Sat Feb 4 00:49:07 2017
|
||||
// by libs/config/tools/generate.cpp
|
||||
// Copyright John Maddock 2002-4.
|
||||
// Use, modification and distribution are subject to the
|
||||
@ -397,6 +397,10 @@ namespace test = boost_no_cxx11_numeric_limits;
|
||||
# include "../test/boost_no_cxx11_ref_qualifiers.ipp"
|
||||
namespace test = boost_no_cxx11_ref_qualifiers;
|
||||
#endif
|
||||
#ifdef TEST_BOOST_NO_CXX11_SFINAE_EXPR
|
||||
# include "../test/boost_no_cxx11_sfinae_expr.ipp"
|
||||
namespace test = boost_no_cxx11_sfinae_expr;
|
||||
#endif
|
||||
#ifdef TEST_BOOST_NO_CXX11_SMART_PTR
|
||||
# include "../test/boost_no_cxx11_smart_ptr.ipp"
|
||||
namespace test = boost_no_cxx11_smart_ptr;
|
||||
|
@ -692,6 +692,9 @@ r-value references.
|
||||
[[`BOOST_NO_CXX11_SCOPED_ENUMS`][The compiler does not support
|
||||
scoped enumerations (`enum class`).
|
||||
]]
|
||||
[[`BOOST_NO_CXX11_SFINAE_EXPR`][The compiler does not support
|
||||
usage of C++11 SFINAE with arbitrary expressions.
|
||||
]]
|
||||
[[`BOOST_NO_CXX11_SMART_PTR`][The standard library header <memory> has no shared_ptr and unique_ptr.]]
|
||||
[[`BOOST_NO_CXX11_STATIC_ASSERT`][The compiler does not support
|
||||
`static_assert`.
|
||||
|
@ -185,6 +185,7 @@
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
|
@ -112,6 +112,7 @@
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
|
@ -95,6 +95,7 @@
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
|
@ -39,6 +39,7 @@
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
|
@ -71,6 +71,7 @@
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
|
@ -253,6 +253,7 @@
|
||||
#if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11)
|
||||
# define BOOST_NO_CXX11_ALIGNAS
|
||||
# define BOOST_NO_CXX11_THREAD_LOCAL
|
||||
# define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#endif
|
||||
|
||||
// C++0x features in 4.8.1 and later
|
||||
|
@ -46,6 +46,7 @@
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
# define BOOST_NO_SFINAE_EXPR
|
||||
# define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
# define BOOST_NO_CXX11_LAMBDAS
|
||||
# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
|
@ -114,6 +114,7 @@
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
|
@ -415,6 +415,11 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
|
||||
# undef BOOST_NO_SFINAE_EXPR
|
||||
#endif
|
||||
|
||||
// BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && !defined(_MSC_VER)
|
||||
# undef BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#endif
|
||||
|
||||
// BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
|
||||
// This is available in earlier Intel releases, but breaks Multiprecision:
|
||||
|
@ -113,6 +113,7 @@
|
||||
#define BOOST_NO_CXX11_RAW_LITERALS
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
|
@ -62,6 +62,7 @@
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
#define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
|
@ -37,6 +37,7 @@
|
||||
# define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
# define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
# define BOOST_NO_SFINAE_EXPR
|
||||
# define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
# define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
# define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
# define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
|
@ -88,6 +88,7 @@
|
||||
#define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
|
@ -141,6 +141,7 @@
|
||||
//
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
|
||||
// C++ 14:
|
||||
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
|
||||
|
@ -114,6 +114,7 @@
|
||||
# define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
#endif
|
||||
#define BOOST_NO_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
#if ! __IBMCPP_STATIC_ASSERT
|
||||
# define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
|
@ -218,6 +218,8 @@
|
||||
//
|
||||
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
||||
|
||||
#define BOOST_NO_CXX11_SFINAE_EXPR
|
||||
|
||||
//
|
||||
// Things that don't work in clr mode:
|
||||
//
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Regression test Jamfile for boost configuration setup.
|
||||
# *** DO NOT EDIT THIS FILE BY HAND ***
|
||||
# This file was automatically generated on Mon Dec 12 19:37:08 2016
|
||||
# This file was automatically generated on Sat Feb 4 00:49:07 2017
|
||||
# by libs/config/tools/generate.cpp
|
||||
# Copyright John Maddock.
|
||||
# Use, modification and distribution are subject to the
|
||||
@ -313,6 +313,9 @@ test-suite "BOOST_NO_CXX11_NUMERIC_LIMITS" :
|
||||
test-suite "BOOST_NO_CXX11_REF_QUALIFIERS" :
|
||||
[ run ../no_cxx11_ref_qualifiers_pass.cpp ]
|
||||
[ compile-fail ../no_cxx11_ref_qualifiers_fail.cpp ] ;
|
||||
test-suite "BOOST_NO_CXX11_SFINAE_EXPR" :
|
||||
[ run ../no_cxx11_sfinae_expr_pass.cpp ]
|
||||
[ compile-fail ../no_cxx11_sfinae_expr_fail.cpp ] ;
|
||||
test-suite "BOOST_NO_CXX11_SMART_PTR" :
|
||||
[ run ../no_cxx11_smart_ptr_pass.cpp ]
|
||||
[ compile-fail ../no_cxx11_smart_ptr_fail.cpp ] ;
|
||||
|
48
test/boost_no_cxx11_sfinae_expr.ipp
Normal file
48
test/boost_no_cxx11_sfinae_expr.ipp
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright 2017 Glen Joseph Fernandes
|
||||
(glenjofe@gmail.com)
|
||||
|
||||
Distributed under Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
// MACRO: BOOST_NO_CXX11_SFINAE_EXPR
|
||||
// TITLE: C++11 SFINAE for expressions
|
||||
// DESCRIPTION: C++11 SFINAE for expressions not supported.
|
||||
|
||||
namespace boost_no_cxx11_sfinae_expr {
|
||||
|
||||
template<class>
|
||||
struct ignore {
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
T& object();
|
||||
|
||||
template<class T, class E = void>
|
||||
struct trait {
|
||||
static const int value = 0;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct trait<T, typename ignore<decltype(&object<T>())>::type> {
|
||||
static const int value = 1;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct result {
|
||||
static const int value = T::value;
|
||||
};
|
||||
|
||||
class type {
|
||||
void operator&() const { }
|
||||
};
|
||||
|
||||
int test()
|
||||
{
|
||||
return result<trait<type> >::value;
|
||||
}
|
||||
|
||||
} /* boost_no_cxx11_sfinae_expr */
|
@ -1053,6 +1053,7 @@ void print_boost_macros()
|
||||
PRINT_MACRO(BOOST_NO_CXX11_REF_QUALIFIERS);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_RVALUE_REFERENCES);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_SCOPED_ENUMS);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_SFINAE_EXPR);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_SMART_PTR);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_STATIC_ASSERT);
|
||||
PRINT_MACRO(BOOST_NO_CXX11_STD_ALIGN);
|
||||
@ -1149,6 +1150,7 @@ void print_boost_macros()
|
||||
|
||||
|
||||
|
||||
|
||||
// END GENERATED BLOCK
|
||||
|
||||
PRINT_MACRO(BOOST_INTEL);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// This file was automatically generated on Mon Dec 12 19:37:08 2016
|
||||
// This file was automatically generated on Sat Feb 4 00:49:07 2017
|
||||
// by libs/config/tools/generate.cpp
|
||||
// Copyright John Maddock 2002-4.
|
||||
// Use, modification and distribution are subject to the
|
||||
@ -242,6 +242,11 @@ namespace boost_no_cxx11_numeric_limits = empty_boost;
|
||||
#else
|
||||
namespace boost_no_cxx11_ref_qualifiers = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#include "boost_no_cxx11_sfinae_expr.ipp"
|
||||
#else
|
||||
namespace boost_no_cxx11_sfinae_expr = empty_boost;
|
||||
#endif
|
||||
#ifndef BOOST_NO_CXX11_SMART_PTR
|
||||
#include "boost_no_cxx11_smart_ptr.ipp"
|
||||
#else
|
||||
@ -1501,6 +1506,11 @@ int main( int, char *[] )
|
||||
std::cerr << "Failed test for BOOST_NO_CXX11_REF_QUALIFIERS at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||
++error_count;
|
||||
}
|
||||
if(0 != boost_no_cxx11_sfinae_expr::test())
|
||||
{
|
||||
std::cerr << "Failed test for BOOST_NO_CXX11_SFINAE_EXPR at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||
++error_count;
|
||||
}
|
||||
if(0 != boost_no_cxx11_smart_ptr::test())
|
||||
{
|
||||
std::cerr << "Failed test for BOOST_NO_CXX11_SMART_PTR at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||
|
37
test/no_cxx11_sfinae_expr_fail.cpp
Normal file
37
test/no_cxx11_sfinae_expr_fail.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
// This file was automatically generated on Sat Feb 4 00:49:07 2017
|
||||
// by libs/config/tools/generate.cpp
|
||||
// Copyright John Maddock 2002-4.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/config for the most recent version.//
|
||||
// Revision $Id$
|
||||
//
|
||||
|
||||
|
||||
// Test file for macro BOOST_NO_CXX11_SFINAE_EXPR
|
||||
// This file should not compile, if it does then
|
||||
// BOOST_NO_CXX11_SFINAE_EXPR should not be defined.
|
||||
// See file boost_no_cxx11_sfinae_expr.ipp for details
|
||||
|
||||
// Must not have BOOST_ASSERT_CONFIG set; it defeats
|
||||
// the objective of this file:
|
||||
#ifdef BOOST_ASSERT_CONFIG
|
||||
# undef BOOST_ASSERT_CONFIG
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
#ifdef BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#include "boost_no_cxx11_sfinae_expr.ipp"
|
||||
#else
|
||||
#error "this file should not compile"
|
||||
#endif
|
||||
|
||||
int main( int, char *[] )
|
||||
{
|
||||
return boost_no_cxx11_sfinae_expr::test();
|
||||
}
|
||||
|
37
test/no_cxx11_sfinae_expr_pass.cpp
Normal file
37
test/no_cxx11_sfinae_expr_pass.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
// This file was automatically generated on Sat Feb 4 00:49:07 2017
|
||||
// by libs/config/tools/generate.cpp
|
||||
// Copyright John Maddock 2002-4.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/config for the most recent version.//
|
||||
// Revision $Id$
|
||||
//
|
||||
|
||||
|
||||
// Test file for macro BOOST_NO_CXX11_SFINAE_EXPR
|
||||
// This file should compile, if it does not then
|
||||
// BOOST_NO_CXX11_SFINAE_EXPR should be defined.
|
||||
// See file boost_no_cxx11_sfinae_expr.ipp for details
|
||||
|
||||
// Must not have BOOST_ASSERT_CONFIG set; it defeats
|
||||
// the objective of this file:
|
||||
#ifdef BOOST_ASSERT_CONFIG
|
||||
# undef BOOST_ASSERT_CONFIG
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SFINAE_EXPR
|
||||
#include "boost_no_cxx11_sfinae_expr.ipp"
|
||||
#else
|
||||
namespace boost_no_cxx11_sfinae_expr = empty_boost;
|
||||
#endif
|
||||
|
||||
int main( int, char *[] )
|
||||
{
|
||||
return boost_no_cxx11_sfinae_expr::test();
|
||||
}
|
||||
|
Reference in New Issue
Block a user