minor change

This commit is contained in:
vrd
2023-10-10 13:59:11 +03:00
parent 105d9e5802
commit 275dc6ddae
3 changed files with 14 additions and 12 deletions
+8 -7
View File
@@ -143,16 +143,17 @@ PendingCmd& operator<(const PendingCmd&, fd_t);
this is not possible */
PendingCmd operator&(const PendingCmd&, const Cmd&);
// todo
/* string that is implicitly cast to const char* and doesn't deallocate
to allow for simpler synthax, speed and safety
e.g: echo + some_string
rather then: echo + some_string.c_str() */
class LeakStr: public std::basic_string<char> /* todo: allocator */
{
public:
using std::basic_string<char>::basic_string;
operator const char*() { return c_str();}
};
// class str: public std::basic_string<char> /* todo: allocator */
// {
// public:
// using std::basic_string<char>::basic_string;
// operator const char*() { return c_str();}
// };
/* Execute a command and capture the output
shell:
@@ -160,4 +161,4 @@ public:
becomes:
auto var = $(ls);
*/
LeakStr $(const PendingCmd&);
std::string $(const PendingCmd&);