mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 18:14:09 +08:00
wutil.h: enable implicit conversion from wcharz_t to wcstring
This allows to write wcstring result = some_rust_function_that_returns_wcharz_t();
This commit is contained in:
parent
bfa94bfa7a
commit
47cc98fd57
@ -31,6 +31,7 @@ struct wcharz_t {
|
||||
|
||||
/* implicit */ wcharz_t(const wchar_t *s) : str(s) {}
|
||||
operator const wchar_t *() const { return str; }
|
||||
operator wcstring() const { return str; }
|
||||
|
||||
inline size_t size() const { return wcslen(str); }
|
||||
inline size_t length() const { return size(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user