diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index a16bef5c..3f9424e0 100644 --- a/checks/Jamfile.v2 +++ b/checks/Jamfile.v2 @@ -1,6 +1,6 @@ # # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Fri Oct 13 19:09:38 2023 +# This file was automatically generated on Mon Jan 22 16:16:53 2024 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -119,6 +119,7 @@ obj cxx14_return_type_deduction : test_case.cpp : TEST_BOOST_NO_CXX14_RE obj cxx14_std_exchange : test_case.cpp : TEST_BOOST_NO_CXX14_STD_EXCHANGE ; obj cxx14_variable_templates : test_case.cpp : TEST_BOOST_NO_CXX14_VARIABLE_TEMPLATES ; obj cxx17 : test_case.cpp : TEST_BOOST_NO_CXX17 ; +obj cxx17_auto_nontype_template_params : test_case.cpp : TEST_BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS ; obj cxx17_deduction_guides : test_case.cpp : TEST_BOOST_NO_CXX17_DEDUCTION_GUIDES ; obj cxx17_fold_expressions : test_case.cpp : TEST_BOOST_NO_CXX17_FOLD_EXPRESSIONS ; obj cxx17_hdr_any : test_case.cpp : TEST_BOOST_NO_CXX17_HDR_ANY ; diff --git a/checks/test_case.cpp b/checks/test_case.cpp index ca724b46..ceb82e01 100644 --- a/checks/test_case.cpp +++ b/checks/test_case.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Oct 13 19:09:38 2023 +// 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 @@ -551,6 +551,11 @@ # error "Defect macro BOOST_NO_CXX17 is defined." # 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 BOOST_NO_CXX17_DEDUCTION_GUIDES # error "Defect macro BOOST_NO_CXX17_DEDUCTION_GUIDES is defined." diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 80164e25..728b5c8f 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -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_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_AUTO_NONTYPE_TEMPLATE_PARAMS`][The compiler does not support `auto` non-type template parameters.]] ] [endsect] diff --git a/include/boost/config/assert_cxx03.hpp b/include/boost/config/assert_cxx03.hpp index c914aa86..ddc05b11 100644 --- a/include/boost/config/assert_cxx03.hpp +++ b/include/boost/config/assert_cxx03.hpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Oct 13 19:09:38 2023 +// 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 diff --git a/include/boost/config/assert_cxx11.hpp b/include/boost/config/assert_cxx11.hpp index addd06ad..a02b1705 100644 --- a/include/boost/config/assert_cxx11.hpp +++ b/include/boost/config/assert_cxx11.hpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Oct 13 19:09:38 2023 +// 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 diff --git a/include/boost/config/assert_cxx14.hpp b/include/boost/config/assert_cxx14.hpp index 061aba3f..d6349014 100644 --- a/include/boost/config/assert_cxx14.hpp +++ b/include/boost/config/assert_cxx14.hpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Oct 13 19:09:38 2023 +// 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 diff --git a/include/boost/config/assert_cxx17.hpp b/include/boost/config/assert_cxx17.hpp index ffa1ae91..289ba71d 100644 --- a/include/boost/config/assert_cxx17.hpp +++ b/include/boost/config/assert_cxx17.hpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Oct 13 19:09:38 2023 +// 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 @@ -12,6 +12,9 @@ #include #include +#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 # error "Your compiler appears not to be fully C++17 compliant. Detected via defect macro BOOST_NO_CXX17_DEDUCTION_GUIDES." #endif diff --git a/include/boost/config/assert_cxx20.hpp b/include/boost/config/assert_cxx20.hpp index 71a74154..c1ac309e 100644 --- a/include/boost/config/assert_cxx20.hpp +++ b/include/boost/config/assert_cxx20.hpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Oct 13 19:09:38 2023 +// 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 diff --git a/include/boost/config/assert_cxx23.hpp b/include/boost/config/assert_cxx23.hpp index feb44573..2b18da99 100644 --- a/include/boost/config/assert_cxx23.hpp +++ b/include/boost/config/assert_cxx23.hpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Oct 13 19:09:38 2023 +// 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 diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index 567636c5..51d51886 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -245,6 +245,9 @@ #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) # define BOOST_NO_CXX17_IF_CONSTEXPR #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 # define BOOST_HAS_TR1_HASH diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 1eeed315..f9a5050b 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -321,6 +321,10 @@ # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #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 #define BOOST_NO_CXX11_SFINAE_EXPR #endif diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp index 4d3f42ae..49f934c0 100644 --- a/include/boost/config/compiler/codegear.hpp +++ b/include/boost/config/compiler/codegear.hpp @@ -316,6 +316,10 @@ # define BOOST_NO_CXX17_IF_CONSTEXPR #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: // diff --git a/include/boost/config/compiler/common_edg.hpp b/include/boost/config/compiler/common_edg.hpp index dc049893..0d59ae0e 100644 --- a/include/boost/config/compiler/common_edg.hpp +++ b/include/boost/config/compiler/common_edg.hpp @@ -171,10 +171,12 @@ #if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #endif - #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) # define BOOST_NO_CXX17_IF_CONSTEXPR #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 // EDG has "long long" in non-strict mode diff --git a/include/boost/config/compiler/digitalmars.hpp b/include/boost/config/compiler/digitalmars.hpp index bb56ff6c..4fa347ab 100644 --- a/include/boost/config/compiler/digitalmars.hpp +++ b/include/boost/config/compiler/digitalmars.hpp @@ -130,6 +130,9 @@ #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) # define BOOST_NO_CXX17_IF_CONSTEXPR #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) #error "Compiler not supported or configured - please reconfigure" diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 2f1fe550..fc05a918 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -319,6 +319,9 @@ #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) # define BOOST_NO_CXX17_IF_CONSTEXPR #endif +#if (__GNUC__ < 7) || (__cplusplus < 201703L) +# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS +#endif #if __GNUC__ >= 7 # define BOOST_FALLTHROUGH __attribute__((fallthrough)) diff --git a/include/boost/config/compiler/gcc_xml.hpp b/include/boost/config/compiler/gcc_xml.hpp index 75cac44e..e23b14d0 100644 --- a/include/boost/config/compiler/gcc_xml.hpp +++ b/include/boost/config/compiler/gcc_xml.hpp @@ -108,7 +108,8 @@ #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) # define BOOST_NO_CXX17_IF_CONSTEXPR #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__ - - diff --git a/include/boost/config/compiler/hp_acc.hpp b/include/boost/config/compiler/hp_acc.hpp index 25636324..42e35e55 100644 --- a/include/boost/config/compiler/hp_acc.hpp +++ b/include/boost/config/compiler/hp_acc.hpp @@ -137,6 +137,10 @@ #define BOOST_NO_CXX11_VARIADIC_MACROS #endif +#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606) +# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS +#endif + #endif // diff --git a/include/boost/config/compiler/metrowerks.hpp b/include/boost/config/compiler/metrowerks.hpp index 448ab67b..c38efb32 100644 --- a/include/boost/config/compiler/metrowerks.hpp +++ b/include/boost/config/compiler/metrowerks.hpp @@ -173,6 +173,9 @@ #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) # define BOOST_NO_CXX17_IF_CONSTEXPR #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) diff --git a/include/boost/config/compiler/mpw.hpp b/include/boost/config/compiler/mpw.hpp index 8433f371..3adb6122 100644 --- a/include/boost/config/compiler/mpw.hpp +++ b/include/boost/config/compiler/mpw.hpp @@ -122,6 +122,9 @@ #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) # define BOOST_NO_CXX17_IF_CONSTEXPR #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: diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp index 419dd724..147f75db 100644 --- a/include/boost/config/compiler/nvcc.hpp +++ b/include/boost/config/compiler/nvcc.hpp @@ -57,5 +57,8 @@ # define BOOST_NO_CXX11_NOEXCEPT #endif +#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606) +# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS #endif +#endif diff --git a/include/boost/config/compiler/pathscale.hpp b/include/boost/config/compiler/pathscale.hpp index 5348cf7f..59ab9b00 100644 --- a/include/boost/config/compiler/pathscale.hpp +++ b/include/boost/config/compiler/pathscale.hpp @@ -135,4 +135,7 @@ #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) # define BOOST_NO_CXX17_IF_CONSTEXPR #endif +#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606) +# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS +#endif #endif diff --git a/include/boost/config/compiler/sunpro_cc.hpp b/include/boost/config/compiler/sunpro_cc.hpp index 490dc76d..334b604b 100644 --- a/include/boost/config/compiler/sunpro_cc.hpp +++ b/include/boost/config/compiler/sunpro_cc.hpp @@ -194,6 +194,9 @@ #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) # define BOOST_NO_CXX17_IF_CONSTEXPR #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. // Ticket #11972 diff --git a/include/boost/config/compiler/vacpp.hpp b/include/boost/config/compiler/vacpp.hpp index 9cfa1adf..3794d360 100644 --- a/include/boost/config/compiler/vacpp.hpp +++ b/include/boost/config/compiler/vacpp.hpp @@ -184,3 +184,6 @@ #if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606) # define BOOST_NO_CXX17_IF_CONSTEXPR #endif +#if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606) +# define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS +#endif diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index c0ada098..ce0fc15e 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -263,6 +263,9 @@ #define BOOST_NO_CXX17_INLINE_VARIABLES #define BOOST_NO_CXX17_FOLD_EXPRESSIONS #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: diff --git a/include/boost/config/compiler/xlcpp.hpp b/include/boost/config/compiler/xlcpp.hpp index 99b8b245..4a4477d9 100644 --- a/include/boost/config/compiler/xlcpp.hpp +++ b/include/boost/config/compiler/xlcpp.hpp @@ -265,6 +265,10 @@ # define BOOST_NO_CXX17_FOLD_EXPRESSIONS #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) # define BOOST_NO_CXX11_THREAD_LOCAL #endif diff --git a/include/boost/config/compiler/xlcpp_zos.hpp b/include/boost/config/compiler/xlcpp_zos.hpp index 9a177f1b..0b288a88 100644 --- a/include/boost/config/compiler/xlcpp_zos.hpp +++ b/include/boost/config/compiler/xlcpp_zos.hpp @@ -157,6 +157,7 @@ #define BOOST_NO_CXX17_INLINE_VARIABLES #define BOOST_NO_CXX17_FOLD_EXPRESSIONS #define BOOST_NO_CXX17_IF_CONSTEXPR +#define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS // ------------------------------------- diff --git a/include/boost/config/detail/cxx_composite.hpp b/include/boost/config/detail/cxx_composite.hpp index 9c2c01ea..a0daaad7 100644 --- a/include/boost/config/detail/cxx_composite.hpp +++ b/include/boost/config/detail/cxx_composite.hpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Oct 13 19:09:38 2023 +// 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 @@ -164,6 +164,7 @@ #endif #if defined(BOOST_NO_CXX14)\ + || defined(BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS)\ || defined(BOOST_NO_CXX17_DEDUCTION_GUIDES)\ || defined(BOOST_NO_CXX17_FOLD_EXPRESSIONS)\ || defined(BOOST_NO_CXX17_HDR_ANY)\ diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index 3f97d624..de06b187 100644 --- a/test/all/Jamfile.v2 +++ b/test/all/Jamfile.v2 @@ -1,7 +1,7 @@ # # Regression test Jamfile for boost configuration setup. # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Fri Oct 13 19:09:38 2023 +# This file was automatically generated on Mon Jan 22 16:16:53 2024 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -346,6 +346,9 @@ test-suite "BOOST_NO_CXX14_VARIABLE_TEMPLATES" : test-suite "BOOST_NO_CXX17" : [ run ../no_cxx17_pass.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" : [ run ../no_cxx17_deduction_guides_pass.cpp ] [ compile-fail ../no_cxx17_deduction_guides_fail.cpp ] ; diff --git a/test/boost_no_cxx17_auto_nontype_template_params.ipp b/test/boost_no_cxx17_auto_nontype_template_params.ipp new file mode 100644 index 00000000..384273a7 --- /dev/null +++ b/test/boost_no_cxx17_auto_nontype_template_params.ipp @@ -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 diff --git a/test/config_info.cpp b/test/config_info.cpp index 4825470c..6198da8f 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -1168,6 +1168,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_CXX14_STD_EXCHANGE); PRINT_MACRO(BOOST_NO_CXX14_VARIABLE_TEMPLATES); 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_FOLD_EXPRESSIONS); PRINT_MACRO(BOOST_NO_CXX17_HDR_ANY); @@ -1287,6 +1288,7 @@ void print_boost_macros() + // END GENERATED BLOCK PRINT_MACRO(BOOST_CXX_VERSION); diff --git a/test/config_test.cpp b/test/config_test.cpp index 8cb33d36..273ce6cc 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Fri Oct 13 19:09:38 2023 +// 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 @@ -377,6 +377,11 @@ namespace boost_no_cxx14_variable_templates = empty_boost; #else namespace boost_no_cxx17 = empty_boost; #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 #include "boost_no_cxx17_deduction_guides.ipp" #else @@ -1741,6 +1746,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_CXX17 at: " << __FILE__ << ":" << __LINE__ << std::endl; ++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()) { std::cerr << "Failed test for BOOST_NO_CXX17_DEDUCTION_GUIDES at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/no_cxx17_auto_nontype_template_params_fail.cpp b/test/no_cxx17_auto_nontype_template_params_fail.cpp new file mode 100644 index 00000000..81bb8dda --- /dev/null +++ b/test/no_cxx17_auto_nontype_template_params_fail.cpp @@ -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 +#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(); +} + diff --git a/test/no_cxx17_auto_nontype_template_params_pass.cpp b/test/no_cxx17_auto_nontype_template_params_pass.cpp new file mode 100644 index 00000000..2910e8f7 --- /dev/null +++ b/test/no_cxx17_auto_nontype_template_params_pass.cpp @@ -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 +#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(); +} +