https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110162
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to jinci kang from comment #0) > $ g++ -std=c++2a -Werror -Wall -Wextra main.cpp > Error: redundant move in initialization [-Werror=redundant-move] > 35 | response->set_body(std::move(*request.body())); > | ~~~~~~~~~^~~~~~~~~~~~~~~~~ You turned this warning on with -Wextra and then you turned it into an error with -Werror. Either stop doing that, or fix the code to avoid the warning.