Compare commits

..

23 Commits

Author SHA1 Message Date
jzmaddock
1cff5e37bb Merge pull request #435 from Lastique/feature/msvc_cxx17_deduction_guides
Enable C++17 CTAD guides for MSVC 14.14 (VS2017 Update 7) and later
2022-06-14 17:56:28 +01:00
Andrey Semashev
cbc2f84709 Enabled C++17 CTAD guides for MSVC 14.14 (VS2017 Update 7) and later.
MSVC doesn't define the standard feature detection macros, so we have to
resort to compiler version checks.
2022-06-06 14:11:25 +03:00
jzmaddock
ae6e2f3dd7 Merge pull request #434 from Lastique/patch-4
Fix a typo in NO_CXX17_DEDUCTION_GUIDES description
2022-06-05 18:26:04 +01:00
Andrey Semashev
f1f0041f28 Fixed a typo in NO_CXX17_DEDUCTION_GUIDES description. 2022-06-05 20:18:37 +03:00
jzmaddock
54a2618377 Merge pull request #433 from boostorg/deduction_guides
Add BOOST_NO_CXX17_DEDUCTION_GUIDES.
2022-06-05 18:13:35 +01:00
jzmaddock
dad856418f Add BOOST_NO_CXX17_DEDUCTION_GUIDES.
Replaces https://github.com/boostorg/config/pull/414.
2022-06-05 16:59:35 +01:00
jzmaddock
68702caadb Merge pull request #432 from boostorg/update-ci2022
Remove no longer supported XCode versions.
2022-06-05 16:26:58 +01:00
jzmaddock
bef3413c30 Remove no longer supported XCode versions.
Reduce when Github jobs are run.
2022-06-05 13:37:28 +01:00
jzmaddock
485ecb42fa Merge pull request #431 from boostorg/pr/boost-nullptr
Add BOOST_NULLPTR helper macro
2022-06-05 12:50:15 +01:00
jzmaddock
424eb5f4ab Change HIP_VERSION to __HIP__
Fixes https://github.com/boostorg/config/issues/392.
2022-06-05 12:45:43 +01:00
Peter Dimov
663198ae92 Add BOOST_NULLPTR helper macro 2022-05-23 02:29:23 +03:00
jzmaddock
26a8d38031 unary_function is deprecated from C++11 onwards.
See https://github.com/boostorg/container_hash/issues/22.
2022-05-12 12:32:08 +01:00
jzmaddock
a7cfad38ea Merge pull request #430 from boostorg/gcc-12-unary_function
Define BOOST_NO_CXX98_FUNCTION_BASE for gcc-12 in C++17 mode or later.
2022-05-10 18:42:46 +01:00
jzmaddock
89ff6355e1 Define BOOST_NO_CXX98_FUNCTION_BASE for gcc-12 in C++17 mode or later.
Fixes: https://github.com/boostorg/container_hash/issues/22.
2022-05-10 18:03:38 +01:00
jzmaddock
2fb424497c Add gcc-11 and 12, plus clang-11, 12, 13 and 14 2022-05-10 17:56:56 +01:00
Glen Fernandes
c11afa5ffa Bump versions to 1.80 2022-04-13 21:36:02 -04:00
jzmaddock
0fb824a274 Merge pull request #426 from Flamefire/patch-1
Doc: Fix description of some macros
2022-03-16 18:50:24 +00:00
Alexander Grund
085a32ae7d Doc: Fix description of some macros
C&P issue and a typo
2022-03-16 18:27:12 +01:00
jzmaddock
6393b50d79 Merge pull request #390 from Kojoley/mips
Rename mips1 to mips and alias mips1 to mips
2022-03-06 11:26:29 +00:00
jzmaddock
a8d36011e7 Merge pull request #415 from Lastique/feature/detect_libstdcxx_11
Add detection of libstdc++ from gcc 11
2022-03-06 11:21:50 +00:00
jzmaddock
9bb8416fc7 Correct msvc-14.0 CI runner. 2022-03-04 09:39:42 +00:00
Andrey Semashev
d39021ce28 Added detection of libstdc++ from gcc 11. 2022-01-21 00:39:29 +03:00
Nikita Kniazev
1a55d1d9c6 Rename mips1 to mips and alias mips1 to mips 2021-07-28 21:06:54 +03:00
24 changed files with 303 additions and 27 deletions

View File

@@ -45,11 +45,6 @@ def main(ctx):
linux_cxx("clang++-10 03,11,14,17,20", "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '03,11,14,17,20', }, globalenv=globalenv),
osx_cxx("XCode-11.7 03,11,17,2a", "clang++", packages="", buildtype="boost", xcode_version="11.7", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,17,2a', }, globalenv=globalenv),
osx_cxx("XCode-10.2 03,11,17,2a", "clang++", packages="", buildtype="boost", xcode_version="10.2", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,17,2a', }, globalenv=globalenv),
osx_cxx("XCode-9.4 03,11,14,1z", "clang++", packages="", buildtype="boost", xcode_version="9.4", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
osx_cxx("XCode-9.0 03,11,14,1z", "clang++", packages="", buildtype="boost", xcode_version="9", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
osx_cxx("XCode-8.3 03,11,14,1z", "clang++", packages="", buildtype="boost", xcode_version="8.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
osx_cxx("XCode-8.0 03,11,14,1z", "clang++", packages="", buildtype="boost", xcode_version="8", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
osx_cxx("XCode-7.3 03,11,14,1z", "clang++", packages="", buildtype="boost", xcode_version="7.3", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', }, globalenv=globalenv),
]
# from https://github.com/boostorg/boost-ci

View File

@@ -5,8 +5,103 @@
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
name: CI
on: [ push, pull_request ]
on:
push:
branches:
- master
- develop
pull_request:
release:
types: [published, created, edited]
jobs:
ubuntu-jammy:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: [ g++-11, g++-12, clang++-14 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install g++-11 g++-12 clang-14
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update Dependencies
run: git submodule update --init tools/build tools/boost_install libs/headers libs/detail libs/core libs/assert libs/type_traits
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/config
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17,20
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17,20
working-directory: ../boost-root/libs/config/test
ubuntu-jammy-clang:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: [ clang++-11, clang++-12, clang++-13 ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: mstachniuk/ci-skip@v1
with:
commit-filter: '[skip ci];[ci skip];[CI SKIP];[SKIP CI];***CI SKIP***;***SKIP CI***;[windows];[Windows];[WINDOWS];[apple];[Apple];[APPLE]'
commit-filter-separator: ';'
fail-fast: true
- name: Set TOOLSET
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
- name: Add repository
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- name: Install packages
run: sudo apt install clang-11 clang-12 clang-13
- name: Checkout main boost
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
- name: Update Dependencies
run: git submodule update --init tools/build tools/boost_install libs/headers libs/detail libs/core libs/assert libs/type_traits
working-directory: ../boost-root
- name: Copy files
run: cp -r $GITHUB_WORKSPACE/* libs/config
working-directory: ../boost-root
- name: Bootstrap
run: ./bootstrap.sh
working-directory: ../boost-root
- name: Generate headers
run: ./b2 headers
working-directory: ../boost-root
- name: Generate user config
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} ;" > ~/user-config.jam'
working-directory: ../boost-root
- name: Config info
run: ../../../b2 print_config_info toolset=$TOOLSET cxxstd=03,11,14,17,20
working-directory: ../boost-root/libs/config/test
- name: Test
run: ../../../b2 toolset=$TOOLSET cxxstd=03,11,14,17,20
working-directory: ../boost-root/libs/config/test
ubuntu-focal:
runs-on: ubuntu-20.04
strategy:
@@ -131,7 +226,7 @@ jobs:
run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=03,11,14,17,2a
working-directory: ../boost-root/libs/config/test
windows_msvc_14_0:
runs-on: windows-latest
runs-on: windows-2019
defaults:
run:
shell: cmd

View File

@@ -1,6 +1,6 @@
#
# *** DO NOT EDIT THIS FILE BY HAND ***
# This file was automatically generated on Thu Feb 3 18:10:41 2022
# This file was automatically generated on Sun Jun 5 16:50:18 2022
# by libs/config/tools/generate.cpp
# Copyright John Maddock.
# Use, modification and distribution are subject to the
@@ -118,6 +118,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_variable_templates : test_case.cpp : <define>TEST_BOOST_NO_CXX14_VARIABLE_TEMPLATES ;
obj cxx17 : test_case.cpp : <define>TEST_BOOST_NO_CXX17 ;
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_hdr_any : test_case.cpp : <define>TEST_BOOST_NO_CXX17_HDR_ANY ;
obj cxx17_hdr_charconv : test_case.cpp : <define>TEST_BOOST_NO_CXX17_HDR_CHARCONV ;

View File

@@ -18,7 +18,8 @@ obj 64 : 64.cpp ;
obj arm : arm.cpp ;
obj combined : combined.cpp ;
obj mips1 : mips1.cpp ;
obj mips : mips.cpp ;
alias mips1 : mips ; # Backwards compatibility
obj power : power.cpp ;
obj riscv : riscv.cpp ;
obj sparc : sparc.cpp ;

View File

@@ -1,4 +1,4 @@
// mips1.cpp
// mips.cpp
//
// Copyright (c) 2012 Steven Watanabe
//
@@ -7,5 +7,5 @@
// http://www.boost.org/LICENSE_1_0.txt)
#if !(defined(__mips) || defined(_MIPS_ISA_MIPS1) || defined(_R3000))
#error "Not MIPS1"
#error "Not MIPS"
#endif

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Thu Feb 3 18:10:41 2022
// This file was automatically generated on Sun Jun 5 16:50:18 2022
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-21.
// Use, modification and distribution are subject to the
@@ -546,6 +546,11 @@
# error "Defect macro BOOST_NO_CXX17 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."
# endif
#endif
#ifdef TEST_BOOST_NO_CXX17_FOLD_EXPRESSIONS
# ifdef BOOST_NO_CXX17_FOLD_EXPRESSIONS
# error "Defect macro BOOST_NO_CXX17_FOLD_EXPRESSIONS is defined."

View File

@@ -966,6 +966,10 @@ and must be defined for all translation units in the program, including Boost li
This macro will no longer have any effect once an official Microsoft
release supports the CTP features.
]]
[[`BOOST_NULLPTR`][
If `BOOST_NO_CXX11_NULLPTR` is not defined (i.e. C++11 compliant compilers), expands to `nullptr`,
otherwise expands to `0`.
]]
]
[endsect]
@@ -1037,6 +1041,7 @@ that are not yet supported by a particular compiler or library.
[[`BOOST_NO_CXX17_ITERATOR_TRAITS`][The compiler does not support SFINAE-friendly `std::iterator_traits`.]]
[[`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.]]
]
[endsect]
@@ -1066,7 +1071,7 @@ that are not yet supported by a particular compiler or library.
[[Macro ][Description ]]
[[`BOOST_NO_CXX20_HDR_BARRIER`][The compiler does not support the header `<barrier>`.]]
[[`BOOST_NO_CXX20_HDR_FORMAT`][The compiler does not support the header `<format>`.]]
[[`BOOST_NO_CXX20_HDR_SOURCE_LOCATION`][The compiler does not support the header `<format>`.]]
[[`BOOST_NO_CXX20_HDR_SOURCE_LOCATION`][The compiler does not support the header `<source_location>`.]]
[[`BOOST_NO_CXX20_HDR_BIT`][The compiler does not support the header `<bit>`.]]
[[`BOOST_NO_CXX20_HDR_LATCH`][The compiler does not support the header `<latch>`.]]
[[`BOOST_NO_CXX20_HDR_SPAN`][The compiler does not support the header `<span>`.]]
@@ -1074,7 +1079,7 @@ that are not yet supported by a particular compiler or library.
[[`BOOST_NO_CXX20_HDR_NUMBERS`][The compiler does not support the header `<numbers>`.]]
[[`BOOST_NO_CXX20_HDR_STOP_TOKEN`][The compiler does not support the header `<stop_token>`.]]
[[`BOOST_NO_CXX20_HDR_CONCEPTS`][The compiler does not support the header `<concepts>`.]]
[[`BOOST_NO_CXX20_HDR_RANGES`][The compiler does not support the header `<range>`.]]
[[`BOOST_NO_CXX20_HDR_RANGES`][The compiler does not support the header `<ranges>`.]]
[[`BOOST_NO_CXX20_HDR_SYNCSTREAM`][The compiler does not support the header `<syncstream>`.]]
[[`BOOST_NO_CXX20_HDR_COROUTINE`][The compiler does not support the header `<coroutine>`.]]
[[`BOOST_NO_CXX20_HDR_SEMAPHORE`][The compiler does not support the header `<semaphore>`.]]

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Thu Feb 3 18:10:41 2022
// This file was automatically generated on Sun Jun 5 16:50:18 2022
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-21.
// Use, modification and distribution are subject to the

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Thu Feb 3 18:10:41 2022
// This file was automatically generated on Sun Jun 5 16:50:18 2022
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-21.
// Use, modification and distribution are subject to the

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Thu Feb 3 18:10:41 2022
// This file was automatically generated on Sun Jun 5 16:50:18 2022
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-21.
// Use, modification and distribution are subject to the

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Thu Feb 3 18:10:41 2022
// This file was automatically generated on Sun Jun 5 16:50:18 2022
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-21.
// Use, modification and distribution are subject to the
@@ -12,6 +12,9 @@
#include <boost/config.hpp>
#include <boost/config/assert_cxx14.hpp>
#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
#ifdef BOOST_NO_CXX17_FOLD_EXPRESSIONS
# error "Your compiler appears not to be fully C++17 compliant. Detected via defect macro BOOST_NO_CXX17_FOLD_EXPRESSIONS."
#endif

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Thu Feb 3 18:10:41 2022
// This file was automatically generated on Sun Jun 5 16:50:18 2022
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-21.
// Use, modification and distribution are subject to the

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Thu Feb 3 18:10:41 2022
// This file was automatically generated on Sun Jun 5 16:50:18 2022
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-21.
// Use, modification and distribution are subject to the
@@ -163,6 +163,7 @@
#endif
#if defined(BOOST_NO_CXX14)\
|| defined(BOOST_NO_CXX17_DEDUCTION_GUIDES)\
|| defined(BOOST_NO_CXX17_FOLD_EXPRESSIONS)\
|| defined(BOOST_NO_CXX17_HDR_ANY)\
|| defined(BOOST_NO_CXX17_HDR_CHARCONV)\

View File

@@ -632,7 +632,7 @@ namespace std{ using ::type_info; }
// nvcc doesn't always parse __noinline__,
// see: https://svn.boost.org/trac/boost/ticket/9392
# define BOOST_NOINLINE __attribute__ ((noinline))
# elif defined(HIP_VERSION)
# elif defined(__HIP__)
// See https://github.com/boostorg/config/issues/392
# define BOOST_NOINLINE __attribute__ ((noinline))
# else
@@ -1069,6 +1069,12 @@ namespace std{ using ::type_info; }
#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST
#if !defined(BOOST_NO_CXX11_NULLPTR)
# define BOOST_NULLPTR nullptr
#else
# define BOOST_NULLPTR 0
#endif
//
// Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined
//
@@ -1213,6 +1219,14 @@ namespace std{ using ::type_info; }
# define BOOST_NO_CXX20_HDR_VERSION
#endif
#if defined(BOOST_MSVC)
#if (BOOST_MSVC < 1914) || (_MSVC_LANG < 201703)
# define BOOST_NO_CXX17_DEDUCTION_GUIDES
#endif
#elif !defined(__cpp_deduction_guides) || (__cpp_deduction_guides < 201606)
# define BOOST_NO_CXX17_DEDUCTION_GUIDES
#endif
//
// Define composite agregate macros:
//

View File

@@ -139,7 +139,9 @@
//
#ifdef __clang__
#if __has_include(<compare>)
#if __has_include(<source_location>)
# define BOOST_LIBSTDCXX_VERSION 110100
#elif __has_include(<compare>)
# define BOOST_LIBSTDCXX_VERSION 100100
#elif __has_include(<memory_resource>)
# define BOOST_LIBSTDCXX_VERSION 90100
@@ -385,6 +387,15 @@ extern "C" char *gets (char *__s);
#define BOOST_NO_CXX20_HDR_BIT
#endif
#if BOOST_LIBSTDCXX_VERSION >= 120000
//
// Unary function is now deprecated in C++11 and later:
//
#if __cplusplus >= 201103L
#define BOOST_NO_CXX98_FUNCTION_BASE
#endif
#endif
#ifndef __cpp_impl_coroutine
# define BOOST_NO_CXX20_HDR_COROUTINE
#endif
@@ -407,6 +418,17 @@ extern "C" char *gets (char *__s);
#endif
#endif
#if defined(__clang__)
#if (__clang_major__ < 11) && !defined(BOOST_NO_CXX20_HDR_RANGES)
# define BOOST_NO_CXX20_HDR_RANGES
#endif
#if (__clang_major__ < 10) && (BOOST_LIBSTDCXX_VERSION >= 110000) && !defined(BOOST_NO_CXX11_HDR_CHRONO)
// Old clang can't parse <chrono>:
# define BOOST_NO_CXX11_HDR_CHRONO
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
#endif
#endif
//
// Headers not present on Solaris with the Oracle compiler:
#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140)

View File

@@ -19,7 +19,7 @@
// BOOST_VERSION / 100 % 1000 is the minor version
// BOOST_VERSION / 100000 is the major version
#define BOOST_VERSION 107900
#define BOOST_VERSION 108000
//
// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
@@ -27,6 +27,6 @@
// number, y is the minor version number, and z is the patch level if not 0.
// This is used by <config/auto_link.hpp> to select which library version to link to.
#define BOOST_LIB_VERSION "1_79"
#define BOOST_LIB_VERSION "1_80"
#endif

View File

@@ -1,7 +1,7 @@
#
# Regression test Jamfile for boost configuration setup.
# *** DO NOT EDIT THIS FILE BY HAND ***
# This file was automatically generated on Thu Feb 3 18:10:41 2022
# This file was automatically generated on Sun Jun 5 16:50:18 2022
# by libs/config/tools/generate.cpp
# Copyright John Maddock.
# Use, modification and distribution are subject to the
@@ -343,6 +343,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_DEDUCTION_GUIDES" :
[ run ../no_cxx17_deduction_guides_pass.cpp ]
[ compile-fail ../no_cxx17_deduction_guides_fail.cpp ] ;
test-suite "BOOST_NO_CXX17_FOLD_EXPRESSIONS" :
[ run ../no_cxx17_fold_expressions_pass.cpp ]
[ compile-fail ../no_cxx17_fold_expressions_fail.cpp ] ;

View File

@@ -0,0 +1,34 @@
/*
* Copyright 2022 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_DEDUCTION_GUIDES
// TITLE: C++17 class template argument deduction guides
// DESCRIPTION: C++17 class template argument deduction guides are not supported.
namespace boost_no_cxx17_deduction_guides {
template< typename T >
struct foo
{
T m_val;
template< typename U >
foo(U const& x) : m_val(x) {}
};
template< typename T >
foo(T const&)->foo< T >;
int test()
{
foo x1(10);
return x1.m_val - 10;
}
} // boost_no_cxx17_deduction_guides

View File

@@ -31,7 +31,7 @@ struct is_abstract_test
template<class U>
static char check_sig(...);
#ifdef __GNUC__
#if defined(__GNUC__) && (__GNUC__ < 10)
enum{ s1 = sizeof(is_abstract_test<T>::template check_sig<T>(0)) };
#else
enum{ s1 = sizeof(check_sig<T>(0)) };
@@ -46,7 +46,12 @@ struct abstract{ virtual void foo() = 0; };
int test()
{
#if defined(__GNUC__) && (__GNUC__ > 10)
// GCC-11 fails the above test, but this is irrelevant in any case:
return 0;
#else
return static_cast<bool>(is_abstract_test<non_abstract>::value) == static_cast<bool>(is_abstract_test<abstract>::value);
#endif
}
}

View File

@@ -1167,6 +1167,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_DEDUCTION_GUIDES);
PRINT_MACRO(BOOST_NO_CXX17_FOLD_EXPRESSIONS);
PRINT_MACRO(BOOST_NO_CXX17_HDR_ANY);
PRINT_MACRO(BOOST_NO_CXX17_HDR_CHARCONV);
@@ -1266,6 +1267,7 @@ void print_boost_macros()
// END GENERATED BLOCK
PRINT_MACRO(BOOST_CXX_VERSION);

View File

@@ -1,4 +1,4 @@
// This file was automatically generated on Thu Feb 3 18:10:41 2022
// This file was automatically generated on Sun Jun 5 16:50:18 2022
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-21.
// Use, modification and distribution are subject to the
@@ -372,6 +372,11 @@ namespace boost_no_cxx14_variable_templates = empty_boost;
#else
namespace boost_no_cxx17 = empty_boost;
#endif
#ifndef BOOST_NO_CXX17_DEDUCTION_GUIDES
#include "boost_no_cxx17_deduction_guides.ipp"
#else
namespace boost_no_cxx17_deduction_guides = empty_boost;
#endif
#ifndef BOOST_NO_CXX17_FOLD_EXPRESSIONS
#include "boost_no_cxx17_fold_expressions.ipp"
#else
@@ -1681,6 +1686,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_deduction_guides::test())
{
std::cerr << "Failed test for BOOST_NO_CXX17_DEDUCTION_GUIDES at: " << __FILE__ << ":" << __LINE__ << std::endl;
++error_count;
}
if(0 != boost_no_cxx17_fold_expressions::test())
{
std::cerr << "Failed test for BOOST_NO_CXX17_FOLD_EXPRESSIONS at: " << __FILE__ << ":" << __LINE__ << std::endl;

View File

@@ -62,6 +62,10 @@ struct trait
enum { value = b };
};
void* test_nullptr()
{
return BOOST_NULLPTR;
}
int main()
{
@@ -82,6 +86,8 @@ int main()
{
result += 2;
}
test_nullptr();
}
catch(int)
{

View File

@@ -0,0 +1,37 @@
// This file was automatically generated on Sun Jun 5 16:50:17 2022
// 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_DEDUCTION_GUIDES
// This file should not compile, if it does then
// BOOST_NO_CXX17_DEDUCTION_GUIDES should not be defined.
// See file boost_no_cxx17_deduction_guides.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_DEDUCTION_GUIDES
#include "boost_no_cxx17_deduction_guides.ipp"
#else
#error "this file should not compile"
#endif
int main( int, char *[] )
{
return boost_no_cxx17_deduction_guides::test();
}

View File

@@ -0,0 +1,37 @@
// This file was automatically generated on Sun Jun 5 16:50:17 2022
// 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_DEDUCTION_GUIDES
// This file should compile, if it does not then
// BOOST_NO_CXX17_DEDUCTION_GUIDES should be defined.
// See file boost_no_cxx17_deduction_guides.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_DEDUCTION_GUIDES
#include "boost_no_cxx17_deduction_guides.ipp"
#else
namespace boost_no_cxx17_deduction_guides = empty_boost;
#endif
int main( int, char *[] )
{
return boost_no_cxx17_deduction_guides::test();
}