-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#24526) [aws-crt-cpp] Fix build on Windows with C++20
* [aws-crt-cpp] Fix build on Windows with C++20 * Fix patch_type and add patch_source * newline at eol * Apply patch for .1a version --------- Co-authored-by: Abril Rincón Blanco <git@rinconblanco.es>
- Loading branch information
1 parent
91adbc6
commit ae4ceb7
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
recipes/aws-crt-cpp/all/patches/0.17.23-fix-cpp20-windows.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 3216ce53fa7f276ae4407a450cafafa9e809fea1 Mon Sep 17 00:00:00 2001 | ||
From: Sam Bisciglia <sbiscigl@asu.edu> | ||
Date: Tue, 12 Apr 2022 14:42:26 -0400 | ||
Subject: [PATCH] Fixes cpp 20 builds for windows. (#364) | ||
|
||
--- | ||
diff --git a/include/aws/crt/StringView.h b/include/aws/crt/StringView.h | ||
index a0fec83..dc2f05b 100644 | ||
--- a/include/aws/crt/StringView.h | ||
+++ b/include/aws/crt/StringView.h | ||
@@ -15,7 +15,7 @@ | ||
#include <stddef.h> | ||
#include <type_traits> | ||
|
||
-#if __cplusplus >= 201703L || (defined(_MSC_LANG) && _MSC_LANG >= 201703L) | ||
+#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) | ||
# include <string_view> | ||
#endif | ||
|
||
@@ -53,7 +53,7 @@ namespace Aws | ||
|
||
basic_string_view &operator=(const basic_string_view &) noexcept = default; | ||
|
||
-#if __cplusplus >= 201703L || (defined(_MSC_LANG) && _MSC_LANG >= 201703L) | ||
+#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) | ||
constexpr basic_string_view(const std::basic_string_view<CharT, Traits> &other) noexcept | ||
: m_size(other.size()), m_data(other.data()) | ||
{ |