From e8381d5e5e19166001561244f7a9db5742f1090a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 15 Nov 2019 09:49:38 +0200 Subject: Add path_name_view struct --- libbutl/path-io.mxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libbutl/path-io.mxx') diff --git a/libbutl/path-io.mxx b/libbutl/path-io.mxx index a44d26b..54f9569 100644 --- a/libbutl/path-io.mxx +++ b/libbutl/path-io.mxx @@ -46,10 +46,10 @@ LIBBUTL_MODEXPORT namespace butl template inline std::basic_ostream& - operator<< (std::basic_ostream& os, const basic_path_name

& pn) + operator<< (std::basic_ostream& os, const basic_path_name_view

& v) { - assert (!pn.empty ()); + assert (!v.null ()); - return pn.name ? (os << *pn.name) : (os << *pn.path); + return v.name != nullptr && *v.name ? (os << **v.name) : (os << *v.path); } } -- cgit v1.1