std::move on const
What happens here?
#include <string>
void consume(std::string&&) {}
int main() {
const std::string s = "hello";
consume(std::move(s));
}
Sign in to answer questions and track your progress
Sign InWhat happens here?
#include <string>
void consume(std::string&&) {}
int main() {
const std::string s = "hello";
consume(std::move(s));
}
Sign in to answer questions and track your progress
Sign In