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/deref.hxx | 40 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tiger-compiler/lib/misc/deref.hxx (limited to 'tiger-compiler/lib/misc/deref.hxx') diff --git a/tiger-compiler/lib/misc/deref.hxx b/tiger-compiler/lib/misc/deref.hxx new file mode 100644 index 0000000..159b9fa --- /dev/null +++ b/tiger-compiler/lib/misc/deref.hxx @@ -0,0 +1,40 @@ +/** + ** \file misc/deref.hxx + ** \brief Inline methods for misc/deref.hh. + **/ + +#pragma once + +#include +#include + +namespace misc +{ + template std::ostream& Deref::operator<<(const T* t) const + { + return this->ostr_ << *t; + } + + template std::ostream& Deref::operator<<(T* t) const + { + return this->ostr_ << *t; + } + + template std::ostream& Deref::operator<<(const ref& t) const + { + return this->ostr_ << *t; + } + + template std::ostream& Deref::operator<<(const T& t) const + { + return this->ostr_ << t; + } + + template std::ostream& Deref::operator<<(T& t) const + { + return this->ostr_ << t; + } + + inline Deref operator<<(std::ostream& ostr, deref_e) { return Deref(ostr); } + +} // namespace misc -- cgit v1.2.3