pe-parse/parser-library/to_string.h
artemdinaburg a8ccfb9df3 Put all of peparse in the peparse namespace. (#26)
* Put all of peparse in the peparse namespace.
* Fixes dupicate symbol problems when using the library inside other applications, namely Python
* Closes #25
2017-03-03 14:41:14 -05:00

15 lines
255 B
C++

#ifndef _TO_STRING_H
#define _TO_STRING_H
#include <sstream>
namespace peparse {
template <class T>
static
std::string to_string(T t, std::ios_base & (*f)(std::ios_base&)) {
std::ostringstream oss;
oss << f << t;
return oss.str();
}
}
#endif