I suggest you ...

To make macros more usable.

Macros are really nice tools to template classes and later change them globally, but the lack of support from visual studio discourages it's usage. Let the developer to debug macros, let the macro expand to actual code if developer wants so. This is essential part of c++ language, it is a very bad idea to ignore it. Give at least some attention to macros and let debug it, if code expansion would be too much.

3 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    PovilasPovilas shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Dave NovakDave Novak commented  ·   ·  Flag as inappropriate

        You could probably accomplish this same goal by using C++ templates. Burying too much code in a macro is never a good thing . . . for the reasons you describe.

        Something else you can look into is selecting the compiler option Preprocess to a File (/P), in the Preprocessor section. This generates a <filename>.i file with all macros fully expanded, which you can rename to something like <filename>2.cpp, add to your project, and then compile and debug.

      Feedback and Knowledge Base