diff options
Diffstat (limited to 'bdep/diagnostics.hxx')
-rw-r--r-- | bdep/diagnostics.hxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bdep/diagnostics.hxx b/bdep/diagnostics.hxx index b094457..521af23 100644 --- a/bdep/diagnostics.hxx +++ b/bdep/diagnostics.hxx @@ -95,10 +95,17 @@ namespace bdep class location { public: - location () {} + // Zero lines or columns are not printed. + // + explicit location (string f, uint64_t l, uint64_t c) : file (move (f)), line (l), column (c) {} + location () = default; + + bool + empty () const {return file.empty ();} + string file; uint64_t line; uint64_t column; |