From 4feadda42d8e977133fa87f4b8a41c06b74ac1f4 Mon Sep 17 00:00:00 2001 From: Vic P Date: Wed, 1 Nov 2023 22:43:32 +0700 Subject: [PATCH] Vutils --- Test/Sample.Misc.h | 6 ++---- include/template/easyprint.tpl | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Test/Sample.Misc.h b/Test/Sample.Misc.h index 27a2005..bc4d4e4 100644 --- a/Test/Sample.Misc.h +++ b/Test/Sample.Misc.h @@ -169,15 +169,13 @@ DEF_SAMPLE(Misc) MessageBoxA(nullptr, "This message box just keep for the program running...", "", MB_OK); - // Easy Print - // C++14 (MSVC 2015+ or MinGW 5.1+) - #if (defined(_MSC_VER) && _MSC_VER >= 1900) || (defined(__MINGW32__) && __cplusplus >= 201402L) + #ifdef VU_HAS_EASY_PRINT { auto pids = vu::name_to_pid(ts("explorer.exe")); auto string = std::ep::stringify_container(pids); std::tcout << string << std::endl; } - #endif // C++14 (MSVC 2015+ or MinGW 5.1+) + #endif // VU_HAS_EASY_PRINT return vu::VU_OK; } diff --git a/include/template/easyprint.tpl b/include/template/easyprint.tpl index 8c74195..3079282 100644 --- a/include/template/easyprint.tpl +++ b/include/template/easyprint.tpl @@ -14,6 +14,7 @@ #if (defined(_MSC_VER) && _MSC_VER >= 1900) || (defined(__MINGW32__) && __cplusplus >= 201402L) #define EASY_PRINT_WINDOWS + #include "3rdparty/EP/include/easyprint.hpp" #include @@ -40,4 +41,6 @@ std::wstring stringify_container_W(const T& container) #define stringify_container stringify_container_A #endif // _UNICODE +#define VU_HAS_EASY_PRINT + #endif // C++14 (MSVC 2015+ or MinGW 5.1+) \ No newline at end of file