Like so:
T a{};
Pre-C++11, this was the simplest approximation:
T a = T();
But it requires T
be copyable (though the copy is certainly going to be elided).
Like so:
T a{};
Pre-C++11, this was the simplest approximation:
T a = T();
But it requires T
be copyable (though the copy is certainly going to be elided).