What's the safest way to define short function name aliases in C++?
问题 Suppose I have a class Utility in a file utility.h : class Utility { public: static double longDescriptiveName(double x) { return x + 42; } }; And then I find that I use the function longDescriptiveName(...) a LOT. So like an irresponsible C++ programmer that I am when I've had too much coffee, I create a new file utilitymacros.h and add the following there: #define ldn Utility::longDescriptiveName Now I include "utilitymacros.h" in any *.cpp where I use ldn(...) and my heart is filled with