diff options
Diffstat (limited to 'meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch')
| -rw-r--r-- | meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch new file mode 100644 index 0000000000..c2304bdd48 --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | From 93987b1ce7d6f91387202495aac61026070597df Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 15 Jan 2023 21:37:52 -0800 | ||
| 4 | Subject: [PATCH] Deprecate u8string_view | ||
| 5 | |||
| 6 | Use basic_string_view instead | ||
| 7 | |||
| 8 | Upstream-Status: Backport [https://github.com/fmtlib/fmt/commit/dea7fde8b7d649923dd41b0766bdf076033c62a2] | ||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | include/spdlog/fmt/bundled/core.h | 3 ++- | ||
| 12 | include/spdlog/fmt/bundled/format.h | 15 ++------------- | ||
| 13 | 2 files changed, 4 insertions(+), 14 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/include/spdlog/fmt/bundled/core.h b/include/spdlog/fmt/bundled/core.h | ||
| 16 | index 50b79351..e8b029ef 100644 | ||
| 17 | --- a/include/spdlog/fmt/bundled/core.h | ||
| 18 | +++ b/include/spdlog/fmt/bundled/core.h | ||
| 19 | @@ -1484,7 +1484,8 @@ FMT_API void vprint(wstring_view format_str, wformat_args args); | ||
| 20 | |||
| 21 | /** | ||
| 22 | \rst | ||
| 23 | - Prints formatted data to ``stdout``. | ||
| 24 | + Formats ``args`` according to specifications in ``format_str`` and writes the | ||
| 25 | + output to ``stdout``. | ||
| 26 | |||
| 27 | **Example**:: | ||
| 28 | |||
| 29 | diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h | ||
| 30 | index 1bb24a52..39426361 100644 | ||
| 31 | --- a/include/spdlog/fmt/bundled/format.h | ||
| 32 | +++ b/include/spdlog/fmt/bundled/format.h | ||
| 33 | @@ -407,21 +407,10 @@ void basic_buffer<T>::append(const U *begin, const U *end) { | ||
| 34 | enum char8_t: unsigned char {}; | ||
| 35 | #endif | ||
| 36 | |||
| 37 | -// A UTF-8 string view. | ||
| 38 | -class u8string_view : public basic_string_view<char8_t> { | ||
| 39 | - public: | ||
| 40 | - typedef char8_t char_type; | ||
| 41 | - | ||
| 42 | - u8string_view(const char *s): | ||
| 43 | - basic_string_view<char8_t>(reinterpret_cast<const char8_t*>(s)) {} | ||
| 44 | - u8string_view(const char *s, size_t count) FMT_NOEXCEPT: | ||
| 45 | - basic_string_view<char8_t>(reinterpret_cast<const char8_t*>(s), count) {} | ||
| 46 | -}; | ||
| 47 | - | ||
| 48 | #if FMT_USE_USER_DEFINED_LITERALS | ||
| 49 | inline namespace literals { | ||
| 50 | -inline u8string_view operator"" _u(const char *s, std::size_t n) { | ||
| 51 | - return {s, n}; | ||
| 52 | +inline basic_string_view<char8_t> operator"" _u(const char* s, std::size_t n) { | ||
| 53 | + return {reinterpret_cast<const char8_t*>(s), n}; | ||
| 54 | } | ||
| 55 | } | ||
| 56 | #endif | ||
| 57 | -- | ||
| 58 | 2.39.0 | ||
| 59 | |||
