1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <string> std::string foo() { return std::string{"abc"}; } int main() { const std::string&& name1 = foo(); std::string&& name2 = foo(); const auto&& name3 = foo(); auto&& name4 = foo(); }