From fa313152767ae60941987450268f9562e1d59d42 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 8 Nov 2019 00:17:11 +0300 Subject: Add path_name_value struct --- libbutl/path-io.mxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libbutl/path-io.mxx') diff --git a/libbutl/path-io.mxx b/libbutl/path-io.mxx index 54d884b..5a91dac 100644 --- a/libbutl/path-io.mxx +++ b/libbutl/path-io.mxx @@ -8,6 +8,8 @@ // C includes. +#include + #ifndef __cpp_lib_modules_ts #include #endif @@ -45,6 +47,8 @@ LIBBUTL_MODEXPORT namespace butl inline std::basic_ostream& operator<< (std::basic_ostream& os, const basic_path_name

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