Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checks for C++14 compliance #920

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def main(ctx):
clang_6_stds = [ "c++14", "c++17" ]
gnu_9_stds = [ "gnu++14", "c++14", "gnu++17", "c++17", "gnu++2a", "c++2a" ]
clang_10_stds = [ "c++14", "c++17", "c++2a" ]
gnu_non_native = [ "gnu++17" ]

result = []

Expand Down Expand Up @@ -52,8 +53,10 @@ def main(ctx):
result.append(linux_cxx("Ubuntu g++-11 " + cxx + " " + suite, "g++-11", packages="g++-11", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-11', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
for cxx in clang_10_stds:
result.append(linux_cxx("Ubuntu clang++-10 " + cxx + " " + suite, "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
for cxx in gnu_9_stds:
for cxx in gnu_non_native:
result.append(linux_cxx("Ubuntu g++ s390s " + cxx + " " + suite, "g++", packages="g++", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="s390x", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
for cxx in gnu_non_native:
result.append(linux_cxx("Ubuntu g++ ARM64" + cxx + " " + suite, "g++", packages="g++", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="arm64", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))

return result

Expand Down
48 changes: 47 additions & 1 deletion include/boost/math/tools/cxx03_warn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,50 @@
# define BOOST_MATH_SHOW_CXX03_WARNING
# define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS"
#endif
#if defined(BOOST_NO_CXX14_AGGREGATE_NSDMI) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
# define BOOST_MATH_SHOW_CXX03_WARNING
# define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX14_AGGREGATE_NSDMI"
#endif
#if defined(BOOST_NO_CXX14_BINARY_LITERALS) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
# define BOOST_MATH_SHOW_CXX03_WARNING
# define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX14_BINARY_LITERALS"
#endif
#if defined(BOOST_NO_CXX14_CONSTEXPR) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
# define BOOST_MATH_SHOW_CXX03_WARNING
# define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX14_CONSTEXPR"
#endif
#if defined(BOOST_NO_CXX14_DECLTYPE_AUTO) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
# define BOOST_MATH_SHOW_CXX03_WARNING
# define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX14_DECLTYPE_AUTO"
#endif
#if defined(BOOST_NO_CXX14_DIGIT_SEPARATORS) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
# define BOOST_MATH_SHOW_CXX03_WARNING
# define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX14_DIGIT_SEPARATORS"
#endif
#if defined(BOOST_NO_CXX14_STD_EXCHANGE) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
# define BOOST_MATH_SHOW_CXX03_WARNING
# define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX14_STD_EXCHANGE"
#endif
#if defined(BOOST_NO_CXX14_GENERIC_LAMBDAS) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
# define BOOST_MATH_SHOW_CXX03_WARNING
# define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX14_GENERIC_LAMBDAS"
#endif
#if defined(BOOST_NO_CXX14_HDR_SHARED_MUTEX) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
# define BOOST_MATH_SHOW_CXX03_WARNING
# define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX14_HDR_SHARED_MUTEX"
#endif
#if defined(BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
# define BOOST_MATH_SHOW_CXX03_WARNING
# define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES"
#endif
#if defined(BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
# define BOOST_MATH_SHOW_CXX03_WARNING
# define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION"
#endif
#if defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES) && !defined(BOOST_MATH_SHOW_CXX03_WARNING)
# define BOOST_MATH_SHOW_CXX03_WARNING
# define BOOST_MATH_CXX03_WARN_REASON "BOOST_NO_CXX14_VARIABLE_TEMPLATES"
#endif

#ifdef BOOST_MATH_SHOW_CXX03_WARNING
//
Expand All @@ -89,7 +133,9 @@
//
// March 2021(mborland): C++03 support has been removed. Replace warning with hard error.
//
#error Support for C++03 has been removed. The minimum requirement for this library is fully compliant C++11.
// Jan 2023(mborland): C++11 support has been removed so tests for C++14 compliance have been added
//
#error Support for C++11 has been removed. The minimum requirement for this library is fully compliant C++14.
#endif

#endif