summaryrefslogtreecommitdiff
path: root/tiger-compiler/lib/misc/error.hxx
blob: ecc021f86f3020ba3d9d5c024245d2fa3f1c0951 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
 ** \file misc/error.hxx
 ** \brief Implement template parts of misc/error.hh.
 */

#pragma once

#include <misc/error.hh>

namespace misc
{
  template <class T> error& error::operator<<(const T& t)
  {
    stream_ << t;
    return *this;
  }

  // Member manipulators.
  inline error& error::operator<<(member_manip_type f)
  {
    (this->*f)();
    return *this;
  }

  // Const member manipulators.
  inline error& error::operator<<(const_member_manip_type f)
  {
    (this->*f)();
    return *this;
  }

} // namespace misc