[Bug c++/89780] -Wpessimizing-move is too agressive with templates and recommends pessimization

herring at lanl dot gov gcc-bugzilla@gcc.gnu.org
Thu Aug 4 21:20:07 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89780

--- Comment #5 from S. Davis Herring <herring at lanl dot gov> ---
Perhaps I'm misunderstanding something, but your example (as well as compiling
the original example with -std=c++20, which produces the same warning but now
calls Dest(Dest&&) in the noMove<Source> case) means that the warning is
correct in C++20 mode (but not in C++17).  If that's the case, why suppress the
warning in formerly dependent contexts regardless of language version?


More information about the Gcc-bugs mailing list