LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
deref.hxx
Go to the documentation of this file.
1 
6 #ifndef MISC_DEREF_HXX
7 # define MISC_DEREF_HXX
8 
9 # include <misc/deref.hh>
10 # include <misc/contract.hh>
11 
12 namespace misc
13 {
14  template <typename T>
15  std::ostream&
16  Deref::operator<<(const T* t) const
17  {
18  return this->ostr_ << *t;
19  }
20 
21  template <typename T>
22  std::ostream&
23  Deref::operator<<(T* t) const
24  {
25  return this->ostr_ << *t;
26  }
27 
28  template <typename T>
29  std::ostream&
30  Deref::operator<<(const ref<T>& t) const
31  {
32  return this->ostr_ << *t;
33  }
34 
35  template <typename T>
36  std::ostream&
37  Deref::operator<<(const T& t) const
38  {
39  return this->ostr_ << t;
40  }
41 
42  template <typename T>
43  std::ostream&
44  Deref::operator<<(T& t) const
45  {
46  return this->ostr_ << t;
47  }
48 
49  inline
50  Deref
51  operator<<(std::ostream& ostr, deref_e)
52  {
53  return Deref(ostr);
54  }
55 }
56 
57 #endif // !MISC_DEREF_HXX