aboutsummaryrefslogtreecommitdiff
path: root/libbutl/path-io.mxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-11-15 09:49:38 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2019-11-15 20:16:31 +0300
commite8381d5e5e19166001561244f7a9db5742f1090a (patch)
tree82c63f9dc164db74cdc7b6702dace947e36edbd0 /libbutl/path-io.mxx
parent31ccc33713e3ebd0fc0479d906f114ea33c5d616 (diff)
Add path_name_view struct
Diffstat (limited to 'libbutl/path-io.mxx')
-rw-r--r--libbutl/path-io.mxx6
1 files changed, 3 insertions, 3 deletions
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 <typename C, typename P>
inline std::basic_ostream<C>&
- operator<< (std::basic_ostream<C>& os, const basic_path_name<P>& pn)
+ operator<< (std::basic_ostream<C>& os, const basic_path_name_view<P>& 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);
}
}