Skip to content

Conversation

@weatherhead99
Copy link
Contributor

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.

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.
@acki-m
Copy link
Contributor

acki-m commented Aug 13, 2019

seems to be not working with the older compilers

@SnapperTT
Copy link

SnapperTT commented Nov 20, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants