mirror of
https://github.com/boostorg/config.git
synced 2025-07-31 21:04:28 +02:00
Add new macro BOOST_NO_CXX17_HDR_OPTIONAL.
Fixes: https://github.com/boostorg/config/issues/236.
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 Apr 18 20:03:40 2018
|
# This file was automatically generated on Sat Aug 4 19:11:09 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
|
||||||
@@ -112,6 +112,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_hdr_optional : test_case.cpp : <define>TEST_BOOST_NO_CXX17_HDR_OPTIONAL ;
|
||||||
obj cxx17_if_constexpr : test_case.cpp : <define>TEST_BOOST_NO_CXX17_IF_CONSTEXPR ;
|
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 ;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// This file was automatically generated on Wed Apr 18 20:03:40 2018
|
// This file was automatically generated on Sat Aug 4 19:11:09 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
|
||||||
@@ -516,6 +516,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_HDR_OPTIONAL
|
||||||
|
# ifdef BOOST_NO_CXX17_HDR_OPTIONAL
|
||||||
|
# error "Defect macro BOOST_NO_CXX17_HDR_OPTIONAL is defined."
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
#ifdef TEST_BOOST_NO_CXX17_IF_CONSTEXPR
|
#ifdef TEST_BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
# ifdef BOOST_NO_CXX17_IF_CONSTEXPR
|
# ifdef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
# error "Defect macro BOOST_NO_CXX17_IF_CONSTEXPR is defined."
|
# error "Defect macro BOOST_NO_CXX17_IF_CONSTEXPR is defined."
|
||||||
|
@@ -3820,6 +3820,18 @@
|
|||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p>
|
||||||
|
<code class="computeroutput"><span class="identifier">BOOST_NO_CXX17_HDR_OPTIONAL</span></code>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p>
|
||||||
|
The compiler does not support the header <code class="computeroutput"><span class="special"><</span><span class="identifier">optional</span><span class="special">></span></code>.
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<p>
|
<p>
|
||||||
<code class="computeroutput"><span class="identifier">BOOST_NO_CXX17_STD_APPLY</span></code>
|
<code class="computeroutput"><span class="identifier">BOOST_NO_CXX17_STD_APPLY</span></code>
|
||||||
|
@@ -993,7 +993,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||||
<td align="left"><p><small>Last revised: August 03, 2018 at 12:07:59 GMT</small></p></td>
|
<td align="left"><p><small>Last revised: August 04, 2018 at 18:19:41 GMT</small></p></td>
|
||||||
<td align="right"><div class="copyright-footer"></div></td>
|
<td align="right"><div class="copyright-footer"></div></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
<hr>
|
<hr>
|
||||||
|
@@ -947,6 +947,7 @@ that are not yet supported by a particular compiler or library.
|
|||||||
|
|
||||||
[table
|
[table
|
||||||
[[Macro ][Description ]]
|
[[Macro ][Description ]]
|
||||||
|
[[`BOOST_NO_CXX17_HDR_OPTIONAL`][The compiler does not support the header `<optional>`.]]
|
||||||
[[`BOOST_NO_CXX17_STD_APPLY`][The compiler does not support `std::apply()`.]]
|
[[`BOOST_NO_CXX17_STD_APPLY`][The compiler does not support `std::apply()`.]]
|
||||||
[[`BOOST_NO_CXX17_STD_INVOKE`][The compiler does not support `std::invoke()`.]]
|
[[`BOOST_NO_CXX17_STD_INVOKE`][The compiler does not support `std::invoke()`.]]
|
||||||
[[`BOOST_NO_CXX17_ITERATOR_TRAITS`][The compiler does not support SFINAE-friendly `std::iterator_traits`.]]
|
[[`BOOST_NO_CXX17_ITERATOR_TRAITS`][The compiler does not support SFINAE-friendly `std::iterator_traits`.]]
|
||||||
|
@@ -202,6 +202,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
|
# define BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
|
# define BOOST_NO_CXX17_HDR_OPTIONAL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// MSVC including version 14 has not yet completely
|
// MSVC including version 14 has not yet completely
|
||||||
|
@@ -1023,6 +1023,11 @@ namespace std{ using ::type_info; }
|
|||||||
# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
|
# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// This is a catch all case for obsolete compilers / std libs:
|
||||||
|
#if !defined(__has_include) || !__has_include(<optional>)
|
||||||
|
# define BOOST_NO_CXX17_HDR_OPTIONAL
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Finish off with checks for macros that are depricated / no longer supported,
|
// Finish off with checks for macros that are depricated / no longer supported,
|
||||||
// if any of these are set then it's very likely that much of Boost will no
|
// if any of these are set then it's very likely that much of Boost will no
|
||||||
|
@@ -89,6 +89,7 @@
|
|||||||
// C++17 features
|
// C++17 features
|
||||||
#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L)
|
#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L)
|
||||||
# define BOOST_NO_CXX17_STD_APPLY
|
# define BOOST_NO_CXX17_STD_APPLY
|
||||||
|
# define BOOST_NO_CXX17_HDR_OPTIONAL
|
||||||
#endif
|
#endif
|
||||||
#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
|
#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
|
||||||
# define BOOST_NO_AUTO_PTR
|
# define BOOST_NO_AUTO_PTR
|
||||||
|
@@ -299,6 +299,7 @@ extern "C" char *gets (char *__s);
|
|||||||
#if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L)
|
#if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L)
|
||||||
# define BOOST_NO_CXX17_STD_INVOKE
|
# define BOOST_NO_CXX17_STD_INVOKE
|
||||||
# define BOOST_NO_CXX17_STD_APPLY
|
# define BOOST_NO_CXX17_STD_APPLY
|
||||||
|
# define BOOST_NO_CXX17_HDR_OPTIONAL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__has_include)
|
#if defined(__has_include)
|
||||||
|
@@ -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 Apr 18 20:03:40 2018
|
# This file was automatically generated on Sat Aug 4 19:11:09 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
|
||||||
@@ -325,6 +325,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_HDR_OPTIONAL" :
|
||||||
|
[ run ../no_cxx17_hdr_optional_pass.cpp ]
|
||||||
|
[ compile-fail ../no_cxx17_hdr_optional_fail.cpp ] ;
|
||||||
test-suite "BOOST_NO_CXX17_IF_CONSTEXPR" :
|
test-suite "BOOST_NO_CXX17_IF_CONSTEXPR" :
|
||||||
[ run ../no_cxx17_if_constexpr_pass.cpp ]
|
[ run ../no_cxx17_if_constexpr_pass.cpp ]
|
||||||
[ compile-fail ../no_cxx17_if_constexpr_fail.cpp ] ;
|
[ compile-fail ../no_cxx17_if_constexpr_fail.cpp ] ;
|
||||||
|
23
test/boost_no_cxx17_hdr_optional.ipp
Normal file
23
test/boost_no_cxx17_hdr_optional.ipp
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// (C) Copyright John Maddock 2018
|
||||||
|
|
||||||
|
// 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 more information.
|
||||||
|
|
||||||
|
// MACRO: BOOST_NO_CXX17_HDR_OPTIONAL
|
||||||
|
// TITLE: C++17 header <optional> unavailable
|
||||||
|
// DESCRIPTION: The standard library does not supply C++17 header <optional>
|
||||||
|
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
|
namespace boost_no_cxx17_hdr_optional {
|
||||||
|
|
||||||
|
int test()
|
||||||
|
{
|
||||||
|
using std::optional;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -1159,6 +1159,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_HDR_OPTIONAL);
|
||||||
PRINT_MACRO(BOOST_NO_CXX17_IF_CONSTEXPR);
|
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);
|
||||||
@@ -1237,6 +1238,7 @@ 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 Apr 18 20:03:40 2018
|
// This file was automatically generated on Sat Aug 4 19:11:09 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_HDR_OPTIONAL
|
||||||
|
#include "boost_no_cxx17_hdr_optional.ipp"
|
||||||
|
#else
|
||||||
|
namespace boost_no_cxx17_hdr_optional = empty_boost;
|
||||||
|
#endif
|
||||||
#ifndef BOOST_NO_CXX17_IF_CONSTEXPR
|
#ifndef BOOST_NO_CXX17_IF_CONSTEXPR
|
||||||
#include "boost_no_cxx17_if_constexpr.ipp"
|
#include "boost_no_cxx17_if_constexpr.ipp"
|
||||||
#else
|
#else
|
||||||
@@ -1501,6 +1506,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_hdr_optional::test())
|
||||||
|
{
|
||||||
|
std::cerr << "Failed test for BOOST_NO_CXX17_HDR_OPTIONAL at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||||
|
++error_count;
|
||||||
|
}
|
||||||
if(0 != boost_no_cxx17_if_constexpr::test())
|
if(0 != boost_no_cxx17_if_constexpr::test())
|
||||||
{
|
{
|
||||||
std::cerr << "Failed test for BOOST_NO_CXX17_IF_CONSTEXPR at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
std::cerr << "Failed test for BOOST_NO_CXX17_IF_CONSTEXPR at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||||
|
37
test/no_cxx17_hdr_optional_fail.cpp
Normal file
37
test/no_cxx17_hdr_optional_fail.cpp
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
// This file was automatically generated on Sat Aug 4 19:11:09 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_HDR_OPTIONAL
|
||||||
|
// This file should not compile, if it does then
|
||||||
|
// BOOST_NO_CXX17_HDR_OPTIONAL should not be defined.
|
||||||
|
// See file boost_no_cxx17_hdr_optional.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_HDR_OPTIONAL
|
||||||
|
#include "boost_no_cxx17_hdr_optional.ipp"
|
||||||
|
#else
|
||||||
|
#error "this file should not compile"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int main( int, char *[] )
|
||||||
|
{
|
||||||
|
return boost_no_cxx17_hdr_optional::test();
|
||||||
|
}
|
||||||
|
|
37
test/no_cxx17_hdr_optional_pass.cpp
Normal file
37
test/no_cxx17_hdr_optional_pass.cpp
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
// This file was automatically generated on Sat Aug 4 19:11:08 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_HDR_OPTIONAL
|
||||||
|
// This file should compile, if it does not then
|
||||||
|
// BOOST_NO_CXX17_HDR_OPTIONAL should be defined.
|
||||||
|
// See file boost_no_cxx17_hdr_optional.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_HDR_OPTIONAL
|
||||||
|
#include "boost_no_cxx17_hdr_optional.ipp"
|
||||||
|
#else
|
||||||
|
namespace boost_no_cxx17_hdr_optional = empty_boost;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int main( int, char *[] )
|
||||||
|
{
|
||||||
|
return boost_no_cxx17_hdr_optional::test();
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user