ug4
stringify.h File Reference
#include <sstream>

Go to the source code of this file.

Classes

class  Stringify
 

Macros

#define mkstr(s)   (Stringify() << s).str()
 Comfortable (but not necessarily efficient) string building. More...
 

Macro Definition Documentation

◆ mkstr

#define mkstr (   s)    (Stringify() << s).str()

Comfortable (but not necessarily efficient) string building.

Based on Stringify, mkstr allows you to easily join strings and convert strings to numbers like this:

std::string s = mkstr("Hello " << 5 << " is a number");
parameterString s
#define mkstr(s)
Comfortable (but not necessarily efficient) string building.
Definition: stringify.h:100

Note that mkstr is not highly efficient. It should only be used in code which is not performance critical.