From eacf52a9a4f3832274fdefc909ab23c13413e128 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 15 Aug 2012 11:46:00 +0200 Subject: Add support for member accessors/modifiers New pragmas: get, set, access. New test: common/access. --- odb/diagnostics.hxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'odb/diagnostics.hxx') diff --git a/odb/diagnostics.hxx b/odb/diagnostics.hxx index b1e89b0..448b83f 100644 --- a/odb/diagnostics.hxx +++ b/odb/diagnostics.hxx @@ -7,6 +7,7 @@ #include +#include #include #include @@ -65,6 +66,23 @@ warn (cxx_lexer&); std::ostream& info (cxx_lexer&); +// Location as a string in the "::" format. +// +std::string +location_string (cutl::fs::path const&, + std::size_t line, + std::size_t clmn, + bool leaf = false); + +inline std::string +location_string (location const& l, bool leaf = false) +{ + return location_string (l.file, l.line, l.column, leaf); +} + +std::string +location_string (location_t, bool leaf = false); + // location_t macro wrappers. // cutl::fs::path -- cgit v1.1