KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is it possible to concat two string literals using a constexpr ? Or put differently, can one eliminate macros in code like: #define nl(str) str "\n" int main() { std::cout << nl("usage: foo") nl("print a message") ; return 0; } Update : There is nothing wrong with using "\n" , however I would like to know whether one can use constexpr to replace those type of macros.
Tags (comma-separated)
Save Edits
Cancel