You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
588 B
30 lines
588 B
//
|
|
// to_string.h
|
|
// OpenGLTemplate
|
|
//
|
|
// Created by Joshua Moerman on 8/18/11.
|
|
// Copyright 2011 Vadovas. All rights reserved.
|
|
//
|
|
|
|
/*
|
|
Workaround for the std::to_string in C++11. Might not be the fastest way (performance-wise), but it was the fastest to implement ;).
|
|
*/
|
|
|
|
#ifndef OpenGLTemplate_to_string_h
|
|
#define OpenGLTemplate_to_string_h
|
|
|
|
#include <iostream>
|
|
#include <sstream>
|
|
|
|
namespace std {
|
|
|
|
template <typename T>
|
|
std::string to_string(T const & x){
|
|
std::stringstream ss;
|
|
ss << x;
|
|
return ss.str();
|
|
}
|
|
|
|
} // end namespace std
|
|
|
|
#endif // OpenGLTemplate_to_string_h
|
|
|