| Revision 196,
314 bytes
checked in by guyru, 3 years ago
(diff) |
|
Add utility.h which was left out of r193.
|
| Line | |
|---|
| 1 | /** |
|---|
| 2 | * \file utility.h |
|---|
| 3 | * \author Guy Rutenberg |
|---|
| 4 | * |
|---|
| 5 | * Various utility functions and templates |
|---|
| 6 | */ |
|---|
| 7 | |
|---|
| 8 | #ifndef UTILITY_INC_LD9EHZZAK8 |
|---|
| 9 | #define UTILITY_INC_LD9EHZZAK8 |
|---|
| 10 | |
|---|
| 11 | #include <sstream> |
|---|
| 12 | #include <string> |
|---|
| 13 | |
|---|
| 14 | template <class T> inline std::string stringify(T x) |
|---|
| 15 | { |
|---|
| 16 | std::ostringstream o; |
|---|
| 17 | o << x; |
|---|
| 18 | return o.str(); |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.