mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00: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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Reference in a new issue