blob: 6e08163fda4cb36782718c3252e08e5fd7086dab (
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
|
/**
** \file misc/escape.hxx
** \brief Inline methods for misc/escape.hh.
**/
#pragma once
#include <misc/contract.hh>
#include <misc/escape.hh>
#include <boost/lexical_cast.hpp>
namespace misc
{
template <class T> escaped escape(const T& obj) { return escaped(obj); }
inline std::ostream& operator<<(std::ostream& o, const escaped& rhs)
{
return rhs.print(o);
}
template <class T> escaped::escaped(const T& obj)
{
pobj_str_ = boost::lexical_cast<std::string>(obj);
}
} // namespace misc
|