aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/diagnostics.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-11-15 13:27:23 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-11-15 21:18:42 +0300
commit460eb164f0051cf0ffab6860220649c4f03c74fb (patch)
tree517455df26047c70429679c7bed790098cb39c4e /libbuild2/diagnostics.hxx
parent678345c5a96f14d05a56bce8a68bdd45dfe1d172 (diff)
Use path_name_view in location and path_name_value in location_value
Diffstat (limited to 'libbuild2/diagnostics.hxx')
-rw-r--r--libbuild2/diagnostics.hxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/libbuild2/diagnostics.hxx b/libbuild2/diagnostics.hxx
index 4b3af4e..6a37561 100644
--- a/libbuild2/diagnostics.hxx
+++ b/libbuild2/diagnostics.hxx
@@ -300,7 +300,7 @@ namespace build2
location_prologue_base (const char* type,
const char* mod,
const char* name,
- const path_name& f,
+ const path_name_view& f,
stream_verbosity sverb)
: type_ (type), mod_ (mod), name_ (name),
loc_ (f),
@@ -312,7 +312,7 @@ namespace build2
path&& f,
stream_verbosity sverb)
: type_ (type), mod_ (mod), name_ (name),
- file_ (move (f)), loc_ (&file_),
+ file_ (move (f)), loc_ (file_),
sverb_ (sverb) {}
void
@@ -367,6 +367,18 @@ namespace build2
return location_prologue (epilogue_, type_, mod_, name_, f, sverb_ ());
}
+ location_prologue
+ operator() (const path_name_view& f) const
+ {
+ return location_prologue (epilogue_, type_, mod_, name_, f, sverb_ ());
+ }
+
+ location_prologue
+ operator() (const path_name_value& f) const
+ {
+ return location_prologue (epilogue_, type_, mod_, name_, f, sverb_ ());
+ }
+
// fail (relative (src)) << ...
//
location_prologue