От: | flаt | ||
Дата: | 06.08.14 07:18 | ||
Оценка: | 6 (1) |
This proposal essentialy
entails standardizing the null coalescing conditional operator as implemented in gcc and clang, with the
syntax a ? : b
to be equivalent to
auto&& temp = a;
temp ? temp : b;
template<typename T> auto ifnull(const T& a, const T& b) { return a ? a : b; }