我在使用clang时遇到了这个错误。为什么无法将operator new声明为inline?
./test.h:198:1: error: replacement function 'operator new' cannot be declared 'inline' [-Werror,-Winline-new-delete]
__forceinline void *operator new(size_t size) { return malloc(size); }
^
./test.h:18:23: note: expanded from macro '__forceinline'
#define __forceinline inline __attribute__((__always_inline__))
^