From a2c8dce85c554aa30607914c57be300feaa3b05f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sun, 20 Oct 2019 21:02:26 +0200 Subject: [PATCH] v2.10.1 --- CMakeLists.txt | 2 +- README.md | 4 +- docs/release-notes.md | 18 +++ include/catch.hpp | 2 +- include/internal/catch_version.cpp | 2 +- single_include/catch2/catch.hpp | 227 +++++++++++++++++++++-------- 6 files changed, 191 insertions(+), 64 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ead6759..385a594c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) endif() -project(Catch2 LANGUAGES CXX VERSION 2.10.0) +project(Catch2 LANGUAGES CXX VERSION 2.10.1) # Provide path for scripts list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake") diff --git a/README.md b/README.md index 2b806cd4..f5d7017b 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ [![Build Status](https://travis-ci.org/catchorg/Catch2.svg?branch=master)](https://travis-ci.org/catchorg/Catch2) [![Build status](https://ci.appveyor.com/api/projects/status/github/catchorg/Catch2?svg=true)](https://ci.appveyor.com/project/catchorg/catch2) [![codecov](https://codecov.io/gh/catchorg/Catch2/branch/master/graph/badge.svg)](https://codecov.io/gh/catchorg/Catch2) -[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/00GdTUbFWaV3bNah) +[![Try online](https://img.shields.io/badge/try-online-blue.svg)](https://wandbox.org/permlink/oT2uthEb4CcTd0hb) [![Join the chat in Discord: https://discord.gg/4CWS9zD](https://img.shields.io/badge/Discord-Chat!-brightgreen.svg)](https://discord.gg/4CWS9zD) -The latest version of the single header can be downloaded directly using this link +The latest version of the single header can be downloaded directly using this link ## Catch2 is released! diff --git a/docs/release-notes.md b/docs/release-notes.md index 0af35c67..8f8823af 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -2,6 +2,7 @@ # Release notes **Contents**
+[2.10.1](#2101)
[2.10.0](#2100)
[2.9.2](#292)
[2.9.1](#291)
@@ -29,6 +30,23 @@ [Even Older versions](#even-older-versions)
+## 2.10.1 + +### Improvements +* Catch2 now guards itself against `min` and `max` macros from `windows.h` (#1772) +* Templated tests will now compile with ICC (#1748) +* `WithinULP` matcher now uses scientific notation for stringification (#1760) + + +### Fixes +* Templated tests no longer trigger `-Wunused-templates` (#1762) +* Suppressed clang-analyzer false positive in context getter (#1230, #1735) + + +### Miscellaneous +* CMake no longer prohibits in-tree build when Catch2 is used as a subproject (#1773, #1774) + + ## 2.10.0 diff --git a/include/catch.hpp b/include/catch.hpp index 5d38092e..0831a1b2 100644 --- a/include/catch.hpp +++ b/include/catch.hpp @@ -11,7 +11,7 @@ #define CATCH_VERSION_MAJOR 2 #define CATCH_VERSION_MINOR 10 -#define CATCH_VERSION_PATCH 0 +#define CATCH_VERSION_PATCH 1 #ifdef __clang__ # pragma clang system_header diff --git a/include/internal/catch_version.cpp b/include/internal/catch_version.cpp index bb5b0616..b64212ca 100644 --- a/include/internal/catch_version.cpp +++ b/include/internal/catch_version.cpp @@ -37,7 +37,7 @@ namespace Catch { } Version const& libraryVersion() { - static Version version( 2, 10, 0, "", 0 ); + static Version version( 2, 10, 1, "", 0 ); return version; } diff --git a/single_include/catch2/catch.hpp b/single_include/catch2/catch.hpp index 391db530..5d104bc4 100644 --- a/single_include/catch2/catch.hpp +++ b/single_include/catch2/catch.hpp @@ -1,6 +1,6 @@ /* - * Catch v2.10.0 - * Generated: 2019-10-13 22:24:46.755734 + * Catch v2.10.1 + * Generated: 2019-10-20 20:52:21.372334 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2019 Two Blue Cubes Ltd. All rights reserved. @@ -15,7 +15,7 @@ #define CATCH_VERSION_MAJOR 2 #define CATCH_VERSION_MINOR 10 -#define CATCH_VERSION_PATCH 0 +#define CATCH_VERSION_PATCH 1 #ifdef __clang__ # pragma clang system_header @@ -163,6 +163,11 @@ namespace Catch { # define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \ _Pragma( "clang diagnostic pop" ) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wunused-template\"" ) +# define CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS \ + _Pragma( "clang diagnostic pop" ) #endif // __clang__ //////////////////////////////////////////////////////////////////////////////// @@ -409,6 +414,19 @@ namespace Catch { # define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS #endif +#if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10) +# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +# undef CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS +#elif defined(__clang__) && (__clang_major__ < 5) +# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +# undef CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS +#endif + +#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +# define CATCH_INTERNAL_UNSUPPRESS_UNUSED_TEMPLATE_WARNINGS +#endif + #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) #define CATCH_TRY if ((true)) #define CATCH_CATCH_ALL if ((false)) @@ -775,35 +793,49 @@ inline auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noex template struct TypeList {};\ template\ constexpr auto get_wrapper() noexcept -> TypeList { return {}; }\ + template class...> struct TemplateTypeList{};\ + template class...Cs>\ + constexpr auto get_wrapper() noexcept -> TemplateTypeList { return {}; }\ + template\ + struct append;\ + template\ + struct rewrap;\ + template class, typename...>\ + struct create;\ + template class, typename>\ + struct convert;\ \ - template class L1, typename...E1, template class L2, typename...E2> \ - constexpr auto append(L1, L2) noexcept -> L1 { return {}; }\ + template \ + struct append { using type = T; };\ template< template class L1, typename...E1, template class L2, typename...E2, typename...Rest>\ - constexpr auto append(L1, L2, Rest...) noexcept -> decltype(append(L1{}, Rest{}...)) { return {}; }\ + struct append, L2, Rest...> { using type = typename append, Rest...>::type; };\ template< template class L1, typename...E1, typename...Rest>\ - constexpr auto append(L1, TypeList, Rest...) noexcept -> L1 { return {}; }\ + struct append, TypeList, Rest...> { using type = L1; };\ \ template< template class Container, template class List, typename...elems>\ - constexpr auto rewrap(List) noexcept -> TypeList> { return {}; }\ + struct rewrap, List> { using type = TypeList>; };\ template< template class Container, template class List, class...Elems, typename...Elements>\ - constexpr auto rewrap(List,Elements...) noexcept -> decltype(append(TypeList>{}, rewrap(Elements{}...))) { return {}; }\ + struct rewrap, List, Elements...> { using type = typename append>, typename rewrap, Elements...>::type>::type; };\ \ template