rttr
rttr copied to clipboard
remove pessimizing moves on return
remove several statements containing "return std::move(x)" which, according to the c++ standard 12.8/31 is pessimizing, because these objects are eligible for the NRVO. This issues a warning in gcc 9 otherwise.
seems to be not working with the older compilers
I'm getting this problem too. May it be fixed by a macro?
#ifdef __GNUC__
#if __GNUC__ >= 9
#define MOVE(X) X
#else
#define MOVE(X) std::move(X)
#endif
#else
#define MOVE(X) std::move(X)
#end
And if so, are you happy for me to submit PR?