forked from boostorg/config
Add BOOST_NO_CXX17_DEDUCTION_GUIDES.
Replaces https://github.com/boostorg/config/pull/414.
This commit is contained in:
@ -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 ;
|
||||
|
@ -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."
|
||||
|
@ -1041,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 class template argument deduction (CTAD) guides.]]
|
||||
]
|
||||
|
||||
[endsect]
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)\
|
||||
|
@ -1219,6 +1219,10 @@ namespace std{ using ::type_info; }
|
||||
# define BOOST_NO_CXX20_HDR_VERSION
|
||||
#endif
|
||||
|
||||
#if !defined(__cpp_deduction_guides) || (__cpp_deduction_guides < 201606)
|
||||
# define BOOST_NO_CXX17_DEDUCTION_GUIDES
|
||||
#endif
|
||||
|
||||
//
|
||||
// Define composite agregate macros:
|
||||
//
|
||||
|
@ -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 ] ;
|
||||
|
34
test/boost_no_cxx17_deduction_guides.ipp
Normal file
34
test/boost_no_cxx17_deduction_guides.ipp
Normal 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
|
@ -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);
|
||||
|
@ -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;
|
||||
|
37
test/no_cxx17_deduction_guides_fail.cpp
Normal file
37
test/no_cxx17_deduction_guides_fail.cpp
Normal 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();
|
||||
}
|
||||
|
37
test/no_cxx17_deduction_guides_pass.cpp
Normal file
37
test/no_cxx17_deduction_guides_pass.cpp
Normal 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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user