4 ms·
The preprocessor is a workable but somewhat poor tool for inlining code due to several reasons (no overloading, no sensible macro scoping, template argument lis
by ChrisFoster 9y ago
The preprocessor is a workable but somewhat poor tool for inlining code due to several reasons (no overloading, no sensible macro scoping, template argument lists clash with macro argument lists, etc). However, it's quite a reasonable tool for helping to force inline code in a nonstandard but somewhat portable way. See, for example, EIGEN_ALWAYS_INLINE at https://eigen.tuxfamily.org/dox/Macros_8h_source.html https://eigen.tuxfamily.org/dox/Macros_8h_source.html