Is there a way to replace the Xmacro idiom using C++11 features, and preferably not using the preprocessor? I was thinking tuple templates could be used, but I’m still trying to grok how those work.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
XMacros are a general tool for doing a wide variety of things. Many of which (such as creating a list of enumerators, strings, etc) are well beyond the capabilities of templates of any kind.
There are probably some cases that you might find a way to replace with templates. But certainly not all of them.