I'm trying to construct a pair, from two values read from a stream. These values need to be read in the correct order (T1, then T2), but I believe the order of argument evaluation is undefined in something like the following:
std::pair<T1, T2> Read(DataStreamRead& stream)
{
return std::pair<T1, T2>(IO::Read<T1>(stream), IO::Read<T2>(stream));
}
(Using intermediate variables works fine, but is there another way?)