Skip to content

Commit

Permalink
Vutils
Browse files Browse the repository at this point in the history
  • Loading branch information
vic4key committed Nov 1, 2023
1 parent 5024db8 commit 4feadda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Test/Sample.Misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
3 changes: 3 additions & 0 deletions include/template/easyprint.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 <string>
Expand All @@ -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+)

0 comments on commit 4feadda

Please sign in to comment.