
27 Jan
2012
27 Jan
'12
9:31 p.m.
On Friday, January 27, 2012 18:57:30 Simonson, Lucanus J wrote:
Optional was implemented to be safe and slow because it was targeting safe and slow use cases. For POD types and anything that has a default constructor a std::pair<bool, T> seems fine to me.
I'm failing to see why optional should be slow. I use it extensively, POD types included, and I don't consider pair<bool, T> as a valid replacement. I'll be glad if it gets optimized for POD types, why not?