I'm using C++ 11 and gcc-4.7.0. I'm looking for an STL solution.
I'd like to have an unsorted multimap that contains objects of myClass with short strings as keys. Emplace looks like a good way to put the objects into the map as I construct them, but I'm not sure if it can do that, or if it will only construct the key/object pair. This should be valid:
table.emplace(myKey, myClass(arg1, arg2, arg3));
But would it be more efficient to do the following, and is it even valid code?
table.emplace(myKey, arg1, arg2, arg3);