diff options
Diffstat (limited to 'tiger-compiler/lib/misc/deref.hxx')
| -rw-r--r-- | tiger-compiler/lib/misc/deref.hxx | 40 |
1 files changed, 40 insertions, 0 deletions
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 <misc/contract.hh> +#include <misc/deref.hh> + +namespace misc +{ + template <typename T> std::ostream& Deref::operator<<(const T* t) const + { + return this->ostr_ << *t; + } + + template <typename T> std::ostream& Deref::operator<<(T* t) const + { + return this->ostr_ << *t; + } + + template <typename T> std::ostream& Deref::operator<<(const ref<T>& t) const + { + return this->ostr_ << *t; + } + + template <typename T> std::ostream& Deref::operator<<(const T& t) const + { + return this->ostr_ << t; + } + + template <typename T> std::ostream& Deref::operator<<(T& t) const + { + return this->ostr_ << t; + } + + inline Deref operator<<(std::ostream& ostr, deref_e) { return Deref(ostr); } + +} // namespace misc |
