add macros part
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
#include "hack/security/is_string.hpp"
|
#include "hack/security/is_string.hpp"
|
||||||
#include "hack/security/is_link.hpp"
|
#include "hack/security/is_link.hpp"
|
||||||
#include "hack/string/utf8_len.hpp"
|
#include "hack/string/utf8_len.hpp"
|
||||||
|
#include "hack/macros/macros.hpp"
|
||||||
|
|
||||||
// for example
|
// for example
|
||||||
int f(int a)
|
int f(int a)
|
||||||
@@ -339,4 +340,12 @@ int main(int argc, char *argv[])
|
|||||||
s = hack::string::utf8_len("asdf");
|
s = hack::string::utf8_len("asdf");
|
||||||
hack::log()(s);
|
hack::log()(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hack::log()("============================================================");
|
||||||
|
hack::log()("macros");
|
||||||
|
|
||||||
|
{// ex: macros make_string
|
||||||
|
std::string s { MAKE_STR(test string) };
|
||||||
|
hack::log()(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
src/hack/macros/macros.hpp
Normal file
3
src/hack/macros/macros.hpp
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#define MAKE_STR2(x) #x
|
||||||
|
#define MAKE_STR(x) MAKE_STR2(x)
|
||||||
|
|
||||||
Reference in New Issue
Block a user