system: add sys_string

"std::basic_string<sys_char>" is too cumbersome and error-prone for
daily use.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2023-08-21 10:20:44 +02:00
parent 42a38802d3
commit 34449d124d

View File

@ -16,6 +16,7 @@
#include "sal.hpp" #include "sal.hpp"
#include <assert.h> #include <assert.h>
#include <stdexcept> #include <stdexcept>
#include <string>
// In case somebody #included <windows.h> before us and didn't #define NOMINMAX // In case somebody #included <windows.h> before us and didn't #define NOMINMAX
#ifdef _WIN32 #ifdef _WIN32
@ -50,6 +51,11 @@ namespace stdex
#define _T(x) x #define _T(x) x
#endif #endif
///
/// String for system functions
///
using sys_string = std::basic_string<stdex::sys_char>;
/// ///
/// Operating system object (file, pipe, anything with an OS handle etc.) /// Operating system object (file, pipe, anything with an OS handle etc.)
/// ///