diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-02-08 15:12:28 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-08 15:12:28 -0800 |
| commit | 7ddae17e2f520e83d25f78c078bf8b8a58fff447 (patch) | |
| tree | 87e2fc5c57a685367ec051b1efbdeb5d3ab43f4d /toolsrc/include/vcpkg_System.h | |
| parent | 5e588ddb5be9e6e27cebcc3be2e1a27f3ca83a50 (diff) | |
| parent | a9f7fc6e90feaad50c1221ef9bd56e2620302215 (diff) | |
| download | vcpkg-7ddae17e2f520e83d25f78c078bf8b8a58fff447.tar.gz vcpkg-7ddae17e2f520e83d25f78c078bf8b8a58fff447.zip | |
Merge branch 'master' into master
Diffstat (limited to 'toolsrc/include/vcpkg_System.h')
| -rw-r--r-- | toolsrc/include/vcpkg_System.h | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/toolsrc/include/vcpkg_System.h b/toolsrc/include/vcpkg_System.h index c420464c1..c9195163c 100644 --- a/toolsrc/include/vcpkg_System.h +++ b/toolsrc/include/vcpkg_System.h @@ -1,12 +1,11 @@ #pragma once #include "vcpkg_Strings.h" +#include "filesystem_fs.h" -#include <filesystem> - -namespace vcpkg {namespace System +namespace vcpkg::System { - std::tr2::sys::path get_exe_path_of_current_process(); + fs::path get_exe_path_of_current_process(); struct exit_code_and_output { @@ -37,8 +36,28 @@ namespace vcpkg {namespace System void print(const char* message); void println(const char* message); - void print(color c, const char* message); - void println(color c, const char* message); + void print(const color c, const char* message); + void println(const color c, const char* message); + + inline void print(const std::string& message) + { + return print(message.c_str()); + } + + inline void println(const std::string& message) + { + return println(message.c_str()); + } + + inline void print(const color c, const std::string& message) + { + return print(c, message.c_str()); + } + + inline void println(const color c, const std::string& message) + { + return println(c, message.c_str()); + } template <class...Args> void print(const char* messageTemplate, const Args&... messageArgs) @@ -47,7 +66,7 @@ namespace vcpkg {namespace System } template <class...Args> - void print(color c, const char* messageTemplate, const Args&... messageArgs) + void print(const color c, const char* messageTemplate, const Args&... messageArgs) { return print(c, Strings::format(messageTemplate, messageArgs...).c_str()); } @@ -59,7 +78,7 @@ namespace vcpkg {namespace System } template <class...Args> - void println(color c, const char* messageTemplate, const Args&... messageArgs) + void println(const color c, const char* messageTemplate, const Args&... messageArgs) { return println(c, Strings::format(messageTemplate, messageArgs...).c_str()); } @@ -74,4 +93,4 @@ namespace vcpkg {namespace System }; std::wstring wdupenv_str(const wchar_t* varname) noexcept; -}} +} |
