From 56aa0eec9aabdedd4c37dea7eac0c08c7c82b9a0 Mon Sep 17 00:00:00 2001 From: Gammasoft Date: Mon, 17 Jul 2023 21:10:31 +0200 Subject: [PATCH] Fix build on Visual Studio 2022 --- .../src/xtd/native/win32/console.cpp | 2 +- src/xtd.core/src/xtd/internal/__opaque_console_win32.cpp | 2 +- src/xtd.tunit/include/xtd/tunit/assert.h | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/xtd.core.native.win32/src/xtd/native/win32/console.cpp b/src/xtd.core.native.win32/src/xtd/native/win32/console.cpp index 64f381a0a4f5..e71aca3a9967 100644 --- a/src/xtd.core.native.win32/src/xtd/native/win32/console.cpp +++ b/src/xtd.core.native.win32/src/xtd/native/win32/console.cpp @@ -37,7 +37,7 @@ namespace { int32_t backColor = __background_color(); int32_t foreColor = __foreground_color(); - bool treat_control_c_as_input = [&]()-> bool { + bool treat_control_c_as_input = []()-> bool { SetConsoleCtrlHandler(&__handler_routine, TRUE); return false; }(); diff --git a/src/xtd.core/src/xtd/internal/__opaque_console_win32.cpp b/src/xtd.core/src/xtd/internal/__opaque_console_win32.cpp index 37685c5887e2..da0c5efdcc3b 100644 --- a/src/xtd.core/src/xtd/internal/__opaque_console_win32.cpp +++ b/src/xtd.core/src/xtd/internal/__opaque_console_win32.cpp @@ -35,7 +35,7 @@ namespace { xtd::console_color backColor = __background_color(); xtd::console_color foreColor = __foreground_color(); - bool treat_control_c_as_input = [&]()-> bool { + bool treat_control_c_as_input = []()-> bool { SetConsoleCtrlHandler(&__handler_routine, TRUE); return false; }(); diff --git a/src/xtd.tunit/include/xtd/tunit/assert.h b/src/xtd.tunit/include/xtd/tunit/assert.h index 1acd9592b0c3..14371eb88528 100644 --- a/src/xtd.tunit/include/xtd/tunit/assert.h +++ b/src/xtd.tunit/include/xtd/tunit/assert.h @@ -661,7 +661,7 @@ namespace xtd { } static void contains(char8_t item, const char8_t* values, const xtd::ustring& message, const xtd::diagnostics::stack_frame& stack_frame) { - ustring s(values); + std::u8string s(values); auto result = std::find(s.begin(), s.end(), item); if (result != s.end()) succeed(message, stack_frame); @@ -670,7 +670,7 @@ namespace xtd { } static void contains(char16_t item, const char16_t* values, const xtd::ustring& message, const xtd::diagnostics::stack_frame& stack_frame) { - ustring s(values); + std::u16string s(values); auto result = std::find(s.begin(), s.end(), item); if (result != s.end()) succeed(message, stack_frame); @@ -679,7 +679,7 @@ namespace xtd { } static void contains(char32_t item, const char32_t* values, const xtd::ustring& message, const xtd::diagnostics::stack_frame& stack_frame) { - ustring s(values); + std::u32string s(values); auto result = std::find(s.begin(), s.end(), item); if (result != s.end()) succeed(message, stack_frame); @@ -688,7 +688,7 @@ namespace xtd { } static void contains(wchar_t item, const wchar_t* values, const xtd::ustring& message, const xtd::diagnostics::stack_frame& stack_frame) { - ustring s(values); + std::wstring s(values); auto result = std::find(s.begin(), s.end(), item); if (result != s.end()) succeed(message, stack_frame);