Is it possible to place a macro in a namespace in c++?

前端 未结 5 1052
花落未央
花落未央 2020-12-05 09:55

My application uses another output than the standard output for logging information, which is why I wrote my own Log(), Error(), Panic()

5条回答
  •  情书的邮戳
    2020-12-05 10:54

    Yes, and your macro would expand to exactly what you expect.

    Debug::Assert (some_condition, "Some_condition should be true");
    

    would be replaced by

    Debug::Assert_(some_condition, "Some_condition should be true", __FILE__, __LINE__)
    

提交回复
热议问题