Merge branch 'develop'

This commit is contained in:
jzmaddock
2024-02-04 09:46:22 +00:00
29 changed files with 195 additions and 29 deletions

View File

@@ -119,6 +119,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 : test_case.cpp : <define>TEST_BOOST_NO_CXX17 ; obj cxx17 : test_case.cpp : <define>TEST_BOOST_NO_CXX17 ;
obj cxx17_auto_nontype_template_params : test_case.cpp : <define>TEST_BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS ;
obj cxx17_deduction_guides : test_case.cpp : <define>TEST_BOOST_NO_CXX17_DEDUCTION_GUIDES ; obj cxx17_deduction_guides : test_case.cpp : <define>TEST_BOOST_NO_CXX17_DEDUCTION_GUIDES ;
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_hdr_any : test_case.cpp : <define>TEST_BOOST_NO_CXX17_HDR_ANY ; obj cxx17_hdr_any : test_case.cpp : <define>TEST_BOOST_NO_CXX17_HDR_ANY ;

View File

@@ -551,6 +551,11 @@
# error "Defect macro BOOST_NO_CXX17 is defined." # error "Defect macro BOOST_NO_CXX17 is defined."
# endif # endif
#endif #endif
#ifdef TEST_BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
# ifdef BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
# error "Defect macro BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS is defined."
# endif
#endif
#ifdef TEST_BOOST_NO_CXX17_DEDUCTION_GUIDES #ifdef TEST_BOOST_NO_CXX17_DEDUCTION_GUIDES
# ifdef BOOST_NO_CXX17_DEDUCTION_GUIDES # ifdef BOOST_NO_CXX17_DEDUCTION_GUIDES
# error "Defect macro BOOST_NO_CXX17_DEDUCTION_GUIDES is defined." # error "Defect macro BOOST_NO_CXX17_DEDUCTION_GUIDES is defined."

View File

@@ -1027,6 +1027,7 @@ that are not yet supported by a particular compiler or library.
[[`BOOST_NO_CXX17_IF_CONSTEXPR`][The compiler does not support `if constexpr`.]] [[`BOOST_NO_CXX17_IF_CONSTEXPR`][The compiler does not support `if constexpr`.]]
[[`BOOST_NO_CXX17_INLINE_VARIABLES`][The compiler does not support `inline` variables.]] [[`BOOST_NO_CXX17_INLINE_VARIABLES`][The compiler does not support `inline` variables.]]
[[`BOOST_NO_CXX17_DEDUCTION_GUIDES`][The compiler does not support class template argument deduction (CTAD) guides.]] [[`BOOST_NO_CXX17_DEDUCTION_GUIDES`][The compiler does not support class template argument deduction (CTAD) guides.]]
[[`BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS`][The compiler does not support `auto` non-type template parameters.]]
] ]
[endsect] [endsect]

View File

@@ -12,6 +12,9 @@
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/config/assert_cxx14.hpp> #include <boost/config/assert_cxx14.hpp>
#ifdef BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
# error "Your compiler appears not to be fully C++17 compliant. Detected via defect macro BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS."
#endif
#ifdef BOOST_NO_CXX17_DEDUCTION_GUIDES #ifdef BOOST_NO_CXX17_DEDUCTION_GUIDES
# error "Your compiler appears not to be fully C++17 compliant. Detected via defect macro BOOST_NO_CXX17_DEDUCTION_GUIDES." # error "Your compiler appears not to be fully C++17 compliant. Detected via defect macro BOOST_NO_CXX17_DEDUCTION_GUIDES."
#endif #endif

View File

@@ -245,6 +245,9 @@
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR # define BOOST_NO_CXX17_IF_CONSTEXPR
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
#if __BORLANDC__ >= 0x590 #if __BORLANDC__ >= 0x590
# define BOOST_HAS_TR1_HASH # define BOOST_HAS_TR1_HASH

View File

@@ -321,6 +321,10 @@
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS # define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif #endif
#if (__clang_major__ < 4) || (__cplusplus < 201406L) /* non-standard value that is greater than 201402, which is reported by clang 4.0.0 for C++1z */
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
#if __cplusplus < 201103L #if __cplusplus < 201103L
#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_SFINAE_EXPR
#endif #endif

View File

@@ -316,6 +316,10 @@
# define BOOST_NO_CXX17_IF_CONSTEXPR # define BOOST_NO_CXX17_IF_CONSTEXPR
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
// //
// TR1 macros: // TR1 macros:
// //

View File

@@ -171,10 +171,12 @@
#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) #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR # define BOOST_NO_CXX17_IF_CONSTEXPR
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
#ifdef c_plusplus #ifdef c_plusplus
// EDG has "long long" in non-strict mode // EDG has "long long" in non-strict mode

View File

@@ -130,6 +130,9 @@
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR # define BOOST_NO_CXX17_IF_CONSTEXPR
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
#if (__DMC__ <= 0x840) #if (__DMC__ <= 0x840)
#error "Compiler not supported or configured - please reconfigure" #error "Compiler not supported or configured - please reconfigure"

View File

@@ -319,6 +319,9 @@
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR # define BOOST_NO_CXX17_IF_CONSTEXPR
#endif #endif
#if (__GNUC__ < 7) || (__cplusplus < 201703L)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
#if __GNUC__ >= 7 #if __GNUC__ >= 7
# define BOOST_FALLTHROUGH __attribute__((fallthrough)) # define BOOST_FALLTHROUGH __attribute__((fallthrough))

View File

@@ -108,7 +108,8 @@
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR # define BOOST_NO_CXX17_IF_CONSTEXPR
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__ #define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__

View File

@@ -137,6 +137,10 @@
#define BOOST_NO_CXX11_VARIADIC_MACROS #define BOOST_NO_CXX11_VARIADIC_MACROS
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
#endif #endif
// //

View File

@@ -173,6 +173,9 @@
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR # define BOOST_NO_CXX17_IF_CONSTEXPR
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#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)

View File

@@ -122,6 +122,9 @@
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR # define BOOST_NO_CXX17_IF_CONSTEXPR
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
// //
// versions check: // versions check:

View File

@@ -57,5 +57,8 @@
# define BOOST_NO_CXX11_NOEXCEPT # define BOOST_NO_CXX11_NOEXCEPT
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif #endif
#endif

View File

@@ -135,4 +135,7 @@
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR # define BOOST_NO_CXX17_IF_CONSTEXPR
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
#endif #endif

View File

@@ -194,6 +194,9 @@
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR # define BOOST_NO_CXX17_IF_CONSTEXPR
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
// Turn on threading support for Solaris 12. // Turn on threading support for Solaris 12.
// Ticket #11972 // Ticket #11972

View File

@@ -184,3 +184,6 @@
#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
# define BOOST_NO_CXX17_IF_CONSTEXPR # define BOOST_NO_CXX17_IF_CONSTEXPR
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif

View File

@@ -263,6 +263,9 @@
#define BOOST_NO_CXX17_INLINE_VARIABLES #define BOOST_NO_CXX17_INLINE_VARIABLES
#define BOOST_NO_CXX17_FOLD_EXPRESSIONS #define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif #endif
#if (_MSC_VER < 1914) || (_MSVC_LANG < 201703)
#define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
// //
// Things that don't work in clr mode: // Things that don't work in clr mode:

View File

@@ -265,6 +265,10 @@
# define BOOST_NO_CXX17_FOLD_EXPRESSIONS # define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif #endif
#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#endif
#if !__has_feature(cxx_thread_local) #if !__has_feature(cxx_thread_local)
# define BOOST_NO_CXX11_THREAD_LOCAL # define BOOST_NO_CXX11_THREAD_LOCAL
#endif #endif

View File

@@ -157,6 +157,7 @@
#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 #define BOOST_NO_CXX17_IF_CONSTEXPR
#define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
// ------------------------------------- // -------------------------------------

View File

@@ -164,6 +164,7 @@
#endif #endif
#if defined(BOOST_NO_CXX14)\ #if defined(BOOST_NO_CXX14)\
|| defined(BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS)\
|| defined(BOOST_NO_CXX17_DEDUCTION_GUIDES)\ || defined(BOOST_NO_CXX17_DEDUCTION_GUIDES)\
|| defined(BOOST_NO_CXX17_FOLD_EXPRESSIONS)\ || defined(BOOST_NO_CXX17_FOLD_EXPRESSIONS)\
|| defined(BOOST_NO_CXX17_HDR_ANY)\ || defined(BOOST_NO_CXX17_HDR_ANY)\

View File

@@ -346,6 +346,9 @@ test-suite "BOOST_NO_CXX14_VARIABLE_TEMPLATES" :
test-suite "BOOST_NO_CXX17" : test-suite "BOOST_NO_CXX17" :
[ run ../no_cxx17_pass.cpp ] [ run ../no_cxx17_pass.cpp ]
[ compile-fail ../no_cxx17_fail.cpp ] ; [ compile-fail ../no_cxx17_fail.cpp ] ;
test-suite "BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS" :
[ run ../no_cxx17_auto_nontype_template_params_pass.cpp ]
[ compile-fail ../no_cxx17_auto_nontype_template_params_fail.cpp ] ;
test-suite "BOOST_NO_CXX17_DEDUCTION_GUIDES" : test-suite "BOOST_NO_CXX17_DEDUCTION_GUIDES" :
[ run ../no_cxx17_deduction_guides_pass.cpp ] [ run ../no_cxx17_deduction_guides_pass.cpp ]
[ compile-fail ../no_cxx17_deduction_guides_fail.cpp ] ; [ compile-fail ../no_cxx17_deduction_guides_fail.cpp ] ;

View File

@@ -0,0 +1,31 @@
/*
* Copyright 2024 Andrey Semashev
*
* 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_AUTO_NONTYPE_TEMPLATE_PARAMS
// TITLE: C++17 auto non-type template parameters
// DESCRIPTION: C++17 auto non-type template parameters are not supported.
namespace boost_no_cxx17_auto_nontype_template_params {
template< auto Value >
struct foo
{
static auto get()
{
return Value;
}
};
const int ten = 10;
int test()
{
return foo< 10 >::get() - *foo< &ten >::get();
}
} // boost_no_cxx17_auto_nontype_template_params

View File

@@ -1168,6 +1168,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); PRINT_MACRO(BOOST_NO_CXX17);
PRINT_MACRO(BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS);
PRINT_MACRO(BOOST_NO_CXX17_DEDUCTION_GUIDES); PRINT_MACRO(BOOST_NO_CXX17_DEDUCTION_GUIDES);
PRINT_MACRO(BOOST_NO_CXX17_FOLD_EXPRESSIONS); PRINT_MACRO(BOOST_NO_CXX17_FOLD_EXPRESSIONS);
PRINT_MACRO(BOOST_NO_CXX17_HDR_ANY); PRINT_MACRO(BOOST_NO_CXX17_HDR_ANY);
@@ -1272,21 +1273,6 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_VOID_RETURNS); PRINT_MACRO(BOOST_NO_VOID_RETURNS);
// END GENERATED BLOCK // END GENERATED BLOCK
PRINT_MACRO(BOOST_CXX_VERSION); PRINT_MACRO(BOOST_CXX_VERSION);

View File

@@ -377,6 +377,11 @@ namespace boost_no_cxx14_variable_templates = empty_boost;
#else #else
namespace boost_no_cxx17 = empty_boost; namespace boost_no_cxx17 = empty_boost;
#endif #endif
#ifndef BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
#include "boost_no_cxx17_auto_nontype_template_params.ipp"
#else
namespace boost_no_cxx17_auto_nontype_template_params = empty_boost;
#endif
#ifndef BOOST_NO_CXX17_DEDUCTION_GUIDES #ifndef BOOST_NO_CXX17_DEDUCTION_GUIDES
#include "boost_no_cxx17_deduction_guides.ipp" #include "boost_no_cxx17_deduction_guides.ipp"
#else #else
@@ -1741,6 +1746,11 @@ int main( int, char *[] )
std::cerr << "Failed test for BOOST_NO_CXX17 at: " << __FILE__ << ":" << __LINE__ << std::endl; std::cerr << "Failed test for BOOST_NO_CXX17 at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count; ++error_count;
} }
if(0 != boost_no_cxx17_auto_nontype_template_params::test())
{
std::cerr << "Failed test for BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_cxx17_deduction_guides::test()) if(0 != boost_no_cxx17_deduction_guides::test())
{ {
std::cerr << "Failed test for BOOST_NO_CXX17_DEDUCTION_GUIDES at: " << __FILE__ << ":" << __LINE__ << std::endl; std::cerr << "Failed test for BOOST_NO_CXX17_DEDUCTION_GUIDES at: " << __FILE__ << ":" << __LINE__ << std::endl;

View File

@@ -0,0 +1,37 @@
// This file was automatically generated on Mon Jan 22 16:16:53 2024
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-21.
// 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_AUTO_NONTYPE_TEMPLATE_PARAMS
// This file should not compile, if it does then
// BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS should not be defined.
// See file boost_no_cxx17_auto_nontype_template_params.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_AUTO_NONTYPE_TEMPLATE_PARAMS
#include "boost_no_cxx17_auto_nontype_template_params.ipp"
#else
#error "this file should not compile"
#endif
int main( int, char *[] )
{
return boost_no_cxx17_auto_nontype_template_params::test();
}

View File

@@ -0,0 +1,37 @@
// This file was automatically generated on Mon Jan 22 16:16:53 2024
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-21.
// 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_AUTO_NONTYPE_TEMPLATE_PARAMS
// This file should compile, if it does not then
// BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS should be defined.
// See file boost_no_cxx17_auto_nontype_template_params.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_AUTO_NONTYPE_TEMPLATE_PARAMS
#include "boost_no_cxx17_auto_nontype_template_params.ipp"
#else
namespace boost_no_cxx17_auto_nontype_template_params = empty_boost;
#endif
int main( int, char *[] )
{
return boost_no_cxx17_auto_nontype_template_params::test();
}

View File

@@ -14,6 +14,7 @@
#include <boost/regex.hpp> #include <boost/regex.hpp>
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp> #include <boost/filesystem/operations.hpp>
#include <boost/filesystem/directory.hpp>
#include <boost/filesystem/fstream.hpp> #include <boost/filesystem/fstream.hpp>
#include <boost/detail/lightweight_main.hpp> #include <boost/detail/lightweight_main.hpp>
#include <iostream> #include <iostream>
@@ -267,10 +268,10 @@ void process_ipp_file(const fs::path& file, bool positive_test)
// get the output filesnames: // get the output filesnames:
boost::regex file_regex("boost_([^.]+)\\.ipp"); boost::regex file_regex("boost_([^.]+)\\.ipp");
positive_file = file.branch_path() / boost::regex_replace(file.leaf().string(), file_regex, "$1_pass.cpp"); positive_file = file.parent_path() / boost::regex_replace(file.filename().string(), file_regex, "$1_pass.cpp");
negative_file = file.branch_path() / boost::regex_replace(file.leaf().string(), file_regex, "$1_fail.cpp"); negative_file = file.parent_path() / boost::regex_replace(file.filename().string(), file_regex, "$1_fail.cpp");
write_test_file(positive_file, macro_name, namespace_name, file.leaf().string(), positive_test, true); write_test_file(positive_file, macro_name, namespace_name, file.filename().string(), positive_test, true);
write_test_file(negative_file, macro_name, namespace_name, file.leaf().string(), positive_test, false); write_test_file(negative_file, macro_name, namespace_name, file.filename().string(), positive_test, false);
// always create config_test data, // always create config_test data,
// positive and negative tests go to separate streams, because for some // positive and negative tests go to separate streams, because for some
@@ -280,7 +281,7 @@ void process_ipp_file(const fs::path& file, bool positive_test)
if(!positive_test) if(!positive_test)
*pout << "n"; *pout << "n";
*pout << "def " << macro_name *pout << "def " << macro_name
<< "\n#include \"" << file.leaf().string() << "\"\n#else\nnamespace " << "\n#include \"" << file.filename().string() << "\"\n#else\nnamespace "
<< namespace_name << " = empty_boost;\n#endif\n"; << namespace_name << " = empty_boost;\n#endif\n";
config_test2 << " if(0 != " << namespace_name << "::test())\n" config_test2 << " if(0 != " << namespace_name << "::test())\n"
@@ -291,12 +292,12 @@ void process_ipp_file(const fs::path& file, bool positive_test)
// always generate the jamfile data: // always generate the jamfile data:
jamfile << "test-suite \"" << macro_name << "\" : \n" jamfile << "test-suite \"" << macro_name << "\" : \n"
"[ run " << positive_file.leaf().string() << " <template>config_options ]\n" "[ run " << positive_file.filename().string() << " <template>config_options ]\n"
"[ compile-fail " << negative_file.leaf().string() << " <template>config_options ] ;\n"; "[ compile-fail " << negative_file.filename().string() << " <template>config_options ] ;\n";
jamfile_v2 << "test-suite \"" << macro_name << "\" : \n" jamfile_v2 << "test-suite \"" << macro_name << "\" : \n"
"[ run ../" << positive_file.leaf().string() << " ]\n" "[ run ../" << positive_file.filename().string() << " ]\n"
"[ compile-fail ../" << negative_file.leaf().string() << " ] ;\n"; "[ compile-fail ../" << negative_file.filename().string() << " ] ;\n";
// Generate data for the Build-checks test file: // Generate data for the Build-checks test file:
build_config_test << "#ifdef TEST_" << macro_name << std::endl; build_config_test << "#ifdef TEST_" << macro_name << std::endl;
@@ -597,7 +598,7 @@ int cpp_main(int argc, char* argv[])
{ {
// try __FILE__: // try __FILE__:
fs::path p(__FILE__); fs::path p(__FILE__);
config_path = p.branch_path().branch_path() / "test"; config_path = p.parent_path().parent_path() / "test";
} }
std::cout << "Info: Boost.Config test path set as: " << config_path.string() << std::endl; std::cout << "Info: Boost.Config test path set as: " << config_path.string() << std::endl;
@@ -608,7 +609,7 @@ int cpp_main(int argc, char* argv[])
std::map<fs::path, bool> files_to_process; std::map<fs::path, bool> files_to_process;
while(i != j) while(i != j)
{ {
if(boost::regex_match(i->path().leaf().string(), ipp_match, ipp_mask)) if(boost::regex_match(i->path().filename().string(), ipp_match, ipp_mask))
{ {
files_to_process[*i] = ipp_match[1].matched; files_to_process[*i] = ipp_match[1].matched;
} }