On 10/02/2013 06:06 PM, Botond Ballo wrote: > Having to repeat 'expr' is rather unfortunate, and C++14 > fixes that. You can now write: > > auto function(A a, B b) > { > return expr; > } > > The only restriction is > that if there are multiple return expressions, they > must all have the same type.
Same type as in the std::is_same sense? Or same type in the a?b:c sense, where b/c can be different types, and one expression must convert to the other's type? I assume you mean the former, but I can imagine cases (think pointers and nullptr) where the latter would definitely be nice. Jeff _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform