Hacker News new | past | comments | ask | show | jobs | submit login

Be careful that 'trivial' is a term if art in the context of C++ initialization. Having to do work is different than not having to do it. Constructting a vector of N optionals is O(N) as opposed of a vector of a truly trivially constructible type, which is O(1) (although I'm not 100% sure if the standard guarantees it or it is just a QoI).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: