From 5cb737731a2d516259080522f938d7c54f650e1a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 17 Oct 2020 19:30:55 +0300 Subject: process_tests: add stdin redirection test --- include/winapi/handle.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/winapi/handle.hpp b/include/winapi/handle.hpp index 5f813bc..f6f4c11 100644 --- a/include/winapi/handle.hpp +++ b/include/winapi/handle.hpp @@ -13,6 +13,7 @@ #include #include +#include #include namespace winapi { @@ -46,6 +47,11 @@ public: void write(const void*, std::size_t nb) const; void write(const Buffer& buffer) const; + template + void write(const std::basic_string& src) const { + write(src.c_str(), src.size() * sizeof(CharT)); + } + void inherit(bool yes = true) const; void dont_inherit() const { inherit(false); } -- cgit v1.2.3