#does the second param i.e. Level(document), assuming that it returns by value, require an std::move?

7 messages · Page 1 of 1 (latest)

storm spindle
#
levels.emplace(std::move(file_name), Level(document));
wind fulcrumBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

torpid grail
#

That question needs some more context.

#

If you're asking if it should be ```cpp
levels.emplace(std::move(file_name), std::move(Level(document)));

then the answer is "most certainly not".
#

Consider temporaries and non-temporaries. std::move is a misnamed std::as_temporary. Level(document) is already a temporary.

storm spindle
#

thanks, that answers my question

#

much appreciated