This macro allows to avoid the strlen overhead for strings known at compile-time.
Usage example:
void doSomething(char const* str, int strLen); void someFunc() { std::pair<char const*, int> str = S("some text"); doSomething (str.first, str.second); }
#include <utility>
Go to the source code of this file.
Defines | |
| #define | S(conststring) std::pair<char const*, int>(conststring, sizeof(conststring) - 1) |
| This macro allows to avoid the strlen overhead for strings known at compile-time. | |
1.4.6