From 967be9e750221ab2ab783f95df79bb26d290a45e Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:07:58 +0200 Subject: add: added projects --- tiger-compiler/lib/misc/escape.hxx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tiger-compiler/lib/misc/escape.hxx (limited to 'tiger-compiler/lib/misc/escape.hxx') diff --git a/tiger-compiler/lib/misc/escape.hxx b/tiger-compiler/lib/misc/escape.hxx new file mode 100644 index 0000000..6e08163 --- /dev/null +++ b/tiger-compiler/lib/misc/escape.hxx @@ -0,0 +1,27 @@ +/** + ** \file misc/escape.hxx + ** \brief Inline methods for misc/escape.hh. + **/ + +#pragma once + +#include +#include + +#include + +namespace misc +{ + template escaped escape(const T& obj) { return escaped(obj); } + + inline std::ostream& operator<<(std::ostream& o, const escaped& rhs) + { + return rhs.print(o); + } + + template escaped::escaped(const T& obj) + { + pobj_str_ = boost::lexical_cast(obj); + } + +} // namespace misc -- cgit v1.2.3