forked from boostorg/config
Merge pull request #216 from tzlaine/develop
Add BOOST_NO_CXX17_IF_CONSTEXPR.
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# *** DO NOT EDIT THIS FILE BY HAND ***
|
# *** DO NOT EDIT THIS FILE BY HAND ***
|
||||||
# This file was automatically generated on Wed Jan 03 23:31:31 2018
|
# This file was automatically generated on Tue Mar 6 17:44:35 2018
|
||||||
# by libs/config/tools/generate.cpp
|
# by libs/config/tools/generate.cpp
|
||||||
# Copyright John Maddock.
|
# Copyright John Maddock.
|
||||||
# Use, modification and distribution are subject to the
|
# Use, modification and distribution are subject to the
|
||||||
@ -111,6 +111,7 @@ obj cxx14_return_type_deduction : test_case.cpp : <define>TEST_BOOST_NO_CXX14_RE
|
|||||||
obj cxx14_std_exchange : test_case.cpp : <define>TEST_BOOST_NO_CXX14_STD_EXCHANGE ;
|
obj cxx14_std_exchange : test_case.cpp : <define>TEST_BOOST_NO_CXX14_STD_EXCHANGE ;
|
||||||
obj cxx14_variable_templates : test_case.cpp : <define>TEST_BOOST_NO_CXX14_VARIABLE_TEMPLATES ;
|
obj cxx14_variable_templates : test_case.cpp : <define>TEST_BOOST_NO_CXX14_VARIABLE_TEMPLATES ;
|
||||||
obj cxx17_fold_expressions : test_case.cpp : <define>TEST_BOOST_NO_CXX17_FOLD_EXPRESSIONS ;
|
obj cxx17_fold_expressions : test_case.cpp : <define>TEST_BOOST_NO_CXX17_FOLD_EXPRESSIONS ;
|
||||||
|
obj cxx17_if_constexpr : test_case.cpp : <define>TEST_BOOST_NO_CXX17_IF_CONSTEXPR ;
|
||||||
obj cxx17_inline_variables : test_case.cpp : <define>TEST_BOOST_NO_CXX17_INLINE_VARIABLES ;
|
obj cxx17_inline_variables : test_case.cpp : <define>TEST_BOOST_NO_CXX17_INLINE_VARIABLES ;
|
||||||
obj cxx17_iterator_traits : test_case.cpp : <define>TEST_BOOST_NO_CXX17_ITERATOR_TRAITS ;
|
obj cxx17_iterator_traits : test_case.cpp : <define>TEST_BOOST_NO_CXX17_ITERATOR_TRAITS ;
|
||||||
obj cxx17_std_apply : test_case.cpp : <define>TEST_BOOST_NO_CXX17_STD_APPLY ;
|
obj cxx17_std_apply : test_case.cpp : <define>TEST_BOOST_NO_CXX17_STD_APPLY ;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// This file was automatically generated on Wed Jan 03 23:31:31 2018
|
// This file was automatically generated on Tue Mar 6 17:44:35 2018
|
||||||
// by libs/config/tools/generate.cpp
|
// by libs/config/tools/generate.cpp
|
||||||
// Copyright John Maddock 2002-4.
|
// Copyright John Maddock 2002-4.
|
||||||
// Use, modification and distribution are subject to the
|
// Use, modification and distribution are subject to the
|
||||||
@ -511,6 +511,11 @@
|
|||||||
# error "Defect macro BOOST_NO_CXX17_FOLD_EXPRESSIONS is defined."
|
# error "Defect macro BOOST_NO_CXX17_FOLD_EXPRESSIONS is defined."
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef TEST_BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
# ifdef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
# error "Defect macro BOOST_NO_CXX17_IF_CONSTEXPR is defined."
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
#ifdef TEST_BOOST_NO_CXX17_INLINE_VARIABLES
|
#ifdef TEST_BOOST_NO_CXX17_INLINE_VARIABLES
|
||||||
# ifdef BOOST_NO_CXX17_INLINE_VARIABLES
|
# ifdef BOOST_NO_CXX17_INLINE_VARIABLES
|
||||||
# error "Defect macro BOOST_NO_CXX17_INLINE_VARIABLES is defined."
|
# error "Defect macro BOOST_NO_CXX17_INLINE_VARIABLES is defined."
|
||||||
|
@ -239,6 +239,9 @@
|
|||||||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
#if __BORLANDC__ >= 0x590
|
#if __BORLANDC__ >= 0x590
|
||||||
# define BOOST_HAS_TR1_HASH
|
# define BOOST_HAS_TR1_HASH
|
||||||
|
@ -294,6 +294,10 @@
|
|||||||
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
// Clang 3.9+ in c++1z
|
// Clang 3.9+ in c++1z
|
||||||
#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
|
#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
|
||||||
# define BOOST_NO_CXX17_INLINE_VARIABLES
|
# define BOOST_NO_CXX17_INLINE_VARIABLES
|
||||||
|
@ -167,6 +167,10 @@
|
|||||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// TR1 macros:
|
// TR1 macros:
|
||||||
//
|
//
|
||||||
|
@ -149,6 +149,10 @@
|
|||||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef c_plusplus
|
#ifdef c_plusplus
|
||||||
// EDG has "long long" in non-strict mode
|
// EDG has "long long" in non-strict mode
|
||||||
// However, some libraries have insufficient "long long" support
|
// However, some libraries have insufficient "long long" support
|
||||||
|
@ -124,6 +124,9 @@
|
|||||||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (__DMC__ <= 0x840)
|
#if (__DMC__ <= 0x840)
|
||||||
#error "Compiler not supported or configured - please reconfigure"
|
#error "Compiler not supported or configured - please reconfigure"
|
||||||
|
@ -299,6 +299,9 @@
|
|||||||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
#if __GNUC__ >= 7
|
#if __GNUC__ >= 7
|
||||||
# define BOOST_FALLTHROUGH __attribute__((fallthrough))
|
# define BOOST_FALLTHROUGH __attribute__((fallthrough))
|
||||||
|
@ -102,6 +102,9 @@
|
|||||||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
|
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__
|
||||||
|
|
||||||
|
@ -167,6 +167,9 @@
|
|||||||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
|
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
|
||||||
|
|
||||||
|
@ -116,6 +116,9 @@
|
|||||||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// versions check:
|
// versions check:
|
||||||
|
@ -129,4 +129,7 @@
|
|||||||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -182,6 +182,9 @@
|
|||||||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
// Turn on threading support for Solaris 12.
|
// Turn on threading support for Solaris 12.
|
||||||
// Ticket #11972
|
// Ticket #11972
|
||||||
|
@ -178,3 +178,6 @@
|
|||||||
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
|
||||||
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
@ -201,6 +201,7 @@
|
|||||||
//
|
//
|
||||||
#if (_MSC_VER < 1911) || (_MSVC_LANG < 201703)
|
#if (_MSC_VER < 1911) || (_MSVC_LANG < 201703)
|
||||||
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// MSVC including version 14 has not yet completely
|
// MSVC including version 14 has not yet completely
|
||||||
|
@ -246,6 +246,10 @@
|
|||||||
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
|
||||||
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#endif
|
||||||
|
|
||||||
// Clang 3.9+ in c++1z
|
// Clang 3.9+ in c++1z
|
||||||
#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
|
#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
|
||||||
# define BOOST_NO_CXX17_INLINE_VARIABLES
|
# define BOOST_NO_CXX17_INLINE_VARIABLES
|
||||||
|
@ -153,6 +153,7 @@
|
|||||||
#define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
#define BOOST_NO_CXX17_STRUCTURED_BINDINGS
|
||||||
#define BOOST_NO_CXX17_INLINE_VARIABLES
|
#define BOOST_NO_CXX17_INLINE_VARIABLES
|
||||||
#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
|
||||||
|
#define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Regression test Jamfile for boost configuration setup.
|
# Regression test Jamfile for boost configuration setup.
|
||||||
# *** DO NOT EDIT THIS FILE BY HAND ***
|
# *** DO NOT EDIT THIS FILE BY HAND ***
|
||||||
# This file was automatically generated on Wed Jan 03 23:31:31 2018
|
# This file was automatically generated on Tue Mar 6 17:44:35 2018
|
||||||
# by libs/config/tools/generate.cpp
|
# by libs/config/tools/generate.cpp
|
||||||
# Copyright John Maddock.
|
# Copyright John Maddock.
|
||||||
# Use, modification and distribution are subject to the
|
# Use, modification and distribution are subject to the
|
||||||
@ -322,6 +322,9 @@ test-suite "BOOST_NO_CXX14_VARIABLE_TEMPLATES" :
|
|||||||
test-suite "BOOST_NO_CXX17_FOLD_EXPRESSIONS" :
|
test-suite "BOOST_NO_CXX17_FOLD_EXPRESSIONS" :
|
||||||
[ run ../no_cxx17_fold_expressions_pass.cpp ]
|
[ run ../no_cxx17_fold_expressions_pass.cpp ]
|
||||||
[ compile-fail ../no_cxx17_fold_expressions_fail.cpp ] ;
|
[ compile-fail ../no_cxx17_fold_expressions_fail.cpp ] ;
|
||||||
|
test-suite "BOOST_NO_CXX17_IF_CONSTEXPR" :
|
||||||
|
[ run ../no_cxx17_if_constexpr_pass.cpp ]
|
||||||
|
[ compile-fail ../no_cxx17_if_constexpr_fail.cpp ] ;
|
||||||
test-suite "BOOST_NO_CXX17_INLINE_VARIABLES" :
|
test-suite "BOOST_NO_CXX17_INLINE_VARIABLES" :
|
||||||
[ run ../no_cxx17_inline_variables_pass.cpp ]
|
[ run ../no_cxx17_inline_variables_pass.cpp ]
|
||||||
[ compile-fail ../no_cxx17_inline_variables_fail.cpp ] ;
|
[ compile-fail ../no_cxx17_inline_variables_fail.cpp ] ;
|
||||||
|
45
test/boost_no_cxx17_if_constexpr.ipp
Normal file
45
test/boost_no_cxx17_if_constexpr.ipp
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 T. Zachary Laine
|
||||||
|
(whatwasthataddress@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_CXX17_IF_CONSTEXPR
|
||||||
|
// TITLE: C++17 if constexpr
|
||||||
|
// DESCRIPTION: C++17 if constexpr are not supported.
|
||||||
|
|
||||||
|
namespace boost_no_cxx17_if_constexpr {
|
||||||
|
|
||||||
|
template <typename T, typename U>
|
||||||
|
struct same
|
||||||
|
{
|
||||||
|
static constexpr bool value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
struct same<T, T>
|
||||||
|
{
|
||||||
|
static constexpr bool value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
int test()
|
||||||
|
{
|
||||||
|
if constexpr (true) {
|
||||||
|
if constexpr (1 != 0) {
|
||||||
|
if constexpr (same<int, double>::value) {
|
||||||
|
static_assert(!same<int, double>::value, "");
|
||||||
|
return 1;
|
||||||
|
} else if constexpr (false) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1158,6 +1158,7 @@ void print_boost_macros()
|
|||||||
PRINT_MACRO(BOOST_NO_CXX14_STD_EXCHANGE);
|
PRINT_MACRO(BOOST_NO_CXX14_STD_EXCHANGE);
|
||||||
PRINT_MACRO(BOOST_NO_CXX14_VARIABLE_TEMPLATES);
|
PRINT_MACRO(BOOST_NO_CXX14_VARIABLE_TEMPLATES);
|
||||||
PRINT_MACRO(BOOST_NO_CXX17_FOLD_EXPRESSIONS);
|
PRINT_MACRO(BOOST_NO_CXX17_FOLD_EXPRESSIONS);
|
||||||
|
PRINT_MACRO(BOOST_NO_CXX17_IF_CONSTEXPR);
|
||||||
PRINT_MACRO(BOOST_NO_CXX17_INLINE_VARIABLES);
|
PRINT_MACRO(BOOST_NO_CXX17_INLINE_VARIABLES);
|
||||||
PRINT_MACRO(BOOST_NO_CXX17_ITERATOR_TRAITS);
|
PRINT_MACRO(BOOST_NO_CXX17_ITERATOR_TRAITS);
|
||||||
PRINT_MACRO(BOOST_NO_CXX17_STD_APPLY);
|
PRINT_MACRO(BOOST_NO_CXX17_STD_APPLY);
|
||||||
@ -1228,6 +1229,12 @@ void print_boost_macros()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// END GENERATED BLOCK
|
// END GENERATED BLOCK
|
||||||
|
|
||||||
PRINT_MACRO(BOOST_INTEL);
|
PRINT_MACRO(BOOST_INTEL);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// This file was automatically generated on Wed Jan 03 23:31:31 2018
|
// This file was automatically generated on Tue Mar 6 17:44:35 2018
|
||||||
// by libs/config/tools/generate.cpp
|
// by libs/config/tools/generate.cpp
|
||||||
// Copyright John Maddock 2002-4.
|
// Copyright John Maddock 2002-4.
|
||||||
// Use, modification and distribution are subject to the
|
// Use, modification and distribution are subject to the
|
||||||
@ -342,6 +342,11 @@ namespace boost_no_cxx14_variable_templates = empty_boost;
|
|||||||
#else
|
#else
|
||||||
namespace boost_no_cxx17_fold_expressions = empty_boost;
|
namespace boost_no_cxx17_fold_expressions = empty_boost;
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
#include "boost_no_cxx17_if_constexpr.ipp"
|
||||||
|
#else
|
||||||
|
namespace boost_no_cxx17_if_constexpr = empty_boost;
|
||||||
|
#endif
|
||||||
#ifndef BOOST_NO_CXX17_INLINE_VARIABLES
|
#ifndef BOOST_NO_CXX17_INLINE_VARIABLES
|
||||||
#include "boost_no_cxx17_inline_variables.ipp"
|
#include "boost_no_cxx17_inline_variables.ipp"
|
||||||
#else
|
#else
|
||||||
@ -1486,6 +1491,11 @@ int main( int, char *[] )
|
|||||||
std::cerr << "Failed test for BOOST_NO_CXX17_FOLD_EXPRESSIONS at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
std::cerr << "Failed test for BOOST_NO_CXX17_FOLD_EXPRESSIONS at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||||
++error_count;
|
++error_count;
|
||||||
}
|
}
|
||||||
|
if(0 != boost_no_cxx17_if_constexpr::test())
|
||||||
|
{
|
||||||
|
std::cerr << "Failed test for BOOST_NO_CXX17_IF_CONSTEXPR at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||||
|
++error_count;
|
||||||
|
}
|
||||||
if(0 != boost_no_cxx17_inline_variables::test())
|
if(0 != boost_no_cxx17_inline_variables::test())
|
||||||
{
|
{
|
||||||
std::cerr << "Failed test for BOOST_NO_CXX17_INLINE_VARIABLES at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
std::cerr << "Failed test for BOOST_NO_CXX17_INLINE_VARIABLES at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||||
|
37
test/no_cxx17_if_constexpr_fail.cpp
Normal file
37
test/no_cxx17_if_constexpr_fail.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
// This file was automatically generated on Tue Mar 6 00:52:32 2018
|
||||||
|
// 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_CXX17_IF_CONSTEXPR
|
||||||
|
// This file should not compile, if it does then
|
||||||
|
// BOOST_NO_CXX17_IF_CONSTEXPR should not be defined.
|
||||||
|
// See file boost_no_cxx17_if_constexpr.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_CXX17_IF_CONSTEXPR
|
||||||
|
#include "boost_no_cxx17_if_constexpr.ipp"
|
||||||
|
#else
|
||||||
|
#error "this file should not compile"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int main( int, char *[] )
|
||||||
|
{
|
||||||
|
return boost_no_cxx17_if_constexpr::test();
|
||||||
|
}
|
||||||
|
|
37
test/no_cxx17_if_constexpr_pass.cpp
Normal file
37
test/no_cxx17_if_constexpr_pass.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
// This file was automatically generated on Tue Mar 6 00:52:32 2018
|
||||||
|
// 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_CXX17_IF_CONSTEXPR
|
||||||
|
// This file should compile, if it does not then
|
||||||
|
// BOOST_NO_CXX17_IF_CONSTEXPR should be defined.
|
||||||
|
// See file boost_no_cxx17_if_constexpr.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_CXX17_IF_CONSTEXPR
|
||||||
|
#include "boost_no_cxx17_if_constexpr.ipp"
|
||||||
|
#else
|
||||||
|
namespace boost_no_cxx17_if_constexpr = empty_boost;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int main( int, char *[] )
|
||||||
|
{
|
||||||
|
return boost_no_cxx17_if_constexpr::test();
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user