diff --git a/checks/Jamfile.v2 b/checks/Jamfile.v2 index 2fcbb854..2697985e 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 Sat Aug 4 19:11:09 2018 +# This file was automatically generated on Thu Aug 16 11:20:17 2018 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -113,6 +113,7 @@ obj cxx14_std_exchange : test_case.cpp : TEST_BOOST_NO_CXX14_STD_EXCHANG obj cxx14_variable_templates : test_case.cpp : TEST_BOOST_NO_CXX14_VARIABLE_TEMPLATES ; obj cxx17_fold_expressions : test_case.cpp : TEST_BOOST_NO_CXX17_FOLD_EXPRESSIONS ; obj cxx17_hdr_optional : test_case.cpp : TEST_BOOST_NO_CXX17_HDR_OPTIONAL ; +obj cxx17_hdr_string_view : test_case.cpp : TEST_BOOST_NO_CXX17_HDR_STRING_VIEW ; obj cxx17_if_constexpr : test_case.cpp : TEST_BOOST_NO_CXX17_IF_CONSTEXPR ; obj cxx17_inline_variables : test_case.cpp : TEST_BOOST_NO_CXX17_INLINE_VARIABLES ; obj cxx17_iterator_traits : test_case.cpp : TEST_BOOST_NO_CXX17_ITERATOR_TRAITS ; diff --git a/checks/test_case.cpp b/checks/test_case.cpp index b0a1f387..590aff77 100644 --- a/checks/test_case.cpp +++ b/checks/test_case.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Sat Aug 4 19:11:09 2018 +// This file was automatically generated on Thu Aug 16 11:20:17 2018 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -521,6 +521,11 @@ # error "Defect macro BOOST_NO_CXX17_HDR_OPTIONAL is defined." # endif #endif +#ifdef TEST_BOOST_NO_CXX17_HDR_STRING_VIEW +# ifdef BOOST_NO_CXX17_HDR_STRING_VIEW +# error "Defect macro BOOST_NO_CXX17_HDR_STRING_VIEW is defined." +# endif +#endif #ifdef TEST_BOOST_NO_CXX17_IF_CONSTEXPR # ifdef BOOST_NO_CXX17_IF_CONSTEXPR # error "Defect macro BOOST_NO_CXX17_IF_CONSTEXPR is defined." diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index fd9fc6ba..59fac717 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -3832,6 +3832,18 @@ + +

+ BOOST_NO_CXX17_HDR_STRING_VIEW +

+ + +

+ The compiler does not support the header <string_view>. +

+ + +

BOOST_NO_CXX17_STD_APPLY diff --git a/doc/html/index.html b/doc/html/index.html index 8fba1b03..6858d0a9 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -993,7 +993,7 @@ - +

Last revised: August 04, 2018 at 18:19:41 GMT

Last revised: August 16, 2018 at 10:24:31 GMT


diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 4cad88fc..3e6bbf0f 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -948,6 +948,7 @@ that are not yet supported by a particular compiler or library. [table [[Macro ][Description ]] [[`BOOST_NO_CXX17_HDR_OPTIONAL`][The compiler does not support the header ``.]] +[[`BOOST_NO_CXX17_HDR_STRING_VIEW`][The compiler does not support the header ``.]] [[`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_ITERATOR_TRAITS`][The compiler does not support SFINAE-friendly `std::iterator_traits`.]] diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 3e7fce4a..60518c12 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -203,6 +203,7 @@ # define BOOST_NO_CXX17_STRUCTURED_BINDINGS # define BOOST_NO_CXX17_IF_CONSTEXPR # define BOOST_NO_CXX17_HDR_OPTIONAL +# define BOOST_NO_CXX17_HDR_STRING_VIEW #endif // MSVC including version 14 has not yet completely diff --git a/include/boost/config/detail/suffix.hpp b/include/boost/config/detail/suffix.hpp index 1d6a9eac..cee9647b 100644 --- a/include/boost/config/detail/suffix.hpp +++ b/include/boost/config/detail/suffix.hpp @@ -1026,10 +1026,14 @@ namespace std{ using ::type_info; } // This is a catch all case for obsolete compilers / std libs: #if !defined(__has_include) # define BOOST_NO_CXX17_HDR_OPTIONAL +# define BOOST_NO_CXX17_HDR_STRING_VIEW #else #if !__has_include() # define BOOST_NO_CXX17_HDR_OPTIONAL #endif +#if !__has_include() +# define BOOST_NO_CXX17_HDR_STRING_VIEW +#endif #endif // diff --git a/include/boost/config/stdlib/libcpp.hpp b/include/boost/config/stdlib/libcpp.hpp index ffb9c1e4..ffe2f2a0 100644 --- a/include/boost/config/stdlib/libcpp.hpp +++ b/include/boost/config/stdlib/libcpp.hpp @@ -90,6 +90,7 @@ #if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L) # define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_HDR_OPTIONAL +# define BOOST_NO_CXX17_HDR_STRING_VIEW #endif #if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) # define BOOST_NO_AUTO_PTR diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index d39c1f00..38209ddd 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -300,6 +300,7 @@ extern "C" char *gets (char *__s); # define BOOST_NO_CXX17_STD_INVOKE # define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_HDR_OPTIONAL +# define BOOST_NO_CXX17_HDR_STRING_VIEW #endif #if defined(__has_include) diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index 22682495..e8b778e3 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 Sat Aug 4 19:11:09 2018 +# This file was automatically generated on Thu Aug 16 11:20:17 2018 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -328,6 +328,9 @@ test-suite "BOOST_NO_CXX17_FOLD_EXPRESSIONS" : 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_HDR_STRING_VIEW" : +[ run ../no_cxx17_hdr_string_view_pass.cpp ] +[ compile-fail ../no_cxx17_hdr_string_view_fail.cpp ] ; test-suite "BOOST_NO_CXX17_IF_CONSTEXPR" : [ run ../no_cxx17_if_constexpr_pass.cpp ] [ compile-fail ../no_cxx17_if_constexpr_fail.cpp ] ; diff --git a/test/boost_no_cxx17_hdr_string_view.ipp b/test/boost_no_cxx17_hdr_string_view.ipp new file mode 100644 index 00000000..11589dab --- /dev/null +++ b/test/boost_no_cxx17_hdr_string_view.ipp @@ -0,0 +1,26 @@ +// (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_STRING_VIEW +// TITLE: C++17 header unavailable +// DESCRIPTION: The standard library does not supply C++17 header + +#include + +namespace boost_no_cxx17_hdr_string_view { + +int test() +{ + using std::string_view; + using std::wstring_view; + using std::u16string_view; + using std::u32string_view; + return 0; +} + +} diff --git a/test/config_info.cpp b/test/config_info.cpp index ab4bfd46..65adea8f 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -1160,6 +1160,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_CXX14_VARIABLE_TEMPLATES); PRINT_MACRO(BOOST_NO_CXX17_FOLD_EXPRESSIONS); PRINT_MACRO(BOOST_NO_CXX17_HDR_OPTIONAL); + PRINT_MACRO(BOOST_NO_CXX17_HDR_STRING_VIEW); PRINT_MACRO(BOOST_NO_CXX17_IF_CONSTEXPR); PRINT_MACRO(BOOST_NO_CXX17_INLINE_VARIABLES); PRINT_MACRO(BOOST_NO_CXX17_ITERATOR_TRAITS); @@ -1239,6 +1240,7 @@ void print_boost_macros() + // END GENERATED BLOCK PRINT_MACRO(BOOST_INTEL); diff --git a/test/config_test.cpp b/test/config_test.cpp index b17fd2eb..f18f3701 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Sat Aug 4 19:11:09 2018 +// This file was automatically generated on Thu Aug 16 11:20:17 2018 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -347,6 +347,11 @@ namespace boost_no_cxx17_fold_expressions = empty_boost; #else namespace boost_no_cxx17_hdr_optional = empty_boost; #endif +#ifndef BOOST_NO_CXX17_HDR_STRING_VIEW +#include "boost_no_cxx17_hdr_string_view.ipp" +#else +namespace boost_no_cxx17_hdr_string_view = empty_boost; +#endif #ifndef BOOST_NO_CXX17_IF_CONSTEXPR #include "boost_no_cxx17_if_constexpr.ipp" #else @@ -1511,6 +1516,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_CXX17_HDR_OPTIONAL at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_cxx17_hdr_string_view::test()) + { + std::cerr << "Failed test for BOOST_NO_CXX17_HDR_STRING_VIEW at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_no_cxx17_if_constexpr::test()) { std::cerr << "Failed test for BOOST_NO_CXX17_IF_CONSTEXPR at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/no_cxx17_hdr_string_view_fail.cpp b/test/no_cxx17_hdr_string_view_fail.cpp new file mode 100644 index 00000000..63241313 --- /dev/null +++ b/test/no_cxx17_hdr_string_view_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Aug 16 11:20:17 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_STRING_VIEW +// This file should not compile, if it does then +// BOOST_NO_CXX17_HDR_STRING_VIEW should not be defined. +// See file boost_no_cxx17_hdr_string_view.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_HDR_STRING_VIEW +#include "boost_no_cxx17_hdr_string_view.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx17_hdr_string_view::test(); +} + diff --git a/test/no_cxx17_hdr_string_view_pass.cpp b/test/no_cxx17_hdr_string_view_pass.cpp new file mode 100644 index 00000000..e50648ac --- /dev/null +++ b/test/no_cxx17_hdr_string_view_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Thu Aug 16 11:20:17 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_STRING_VIEW +// This file should compile, if it does not then +// BOOST_NO_CXX17_HDR_STRING_VIEW should be defined. +// See file boost_no_cxx17_hdr_string_view.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_HDR_STRING_VIEW +#include "boost_no_cxx17_hdr_string_view.ipp" +#else +namespace boost_no_cxx17_hdr_string_view = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_cxx17_hdr_string_view::test(); +} +