Originally posted by ultimA
View Post
If you have to check all constructors of a class just to create an object, be extra careful with the "{}"/"()" when constructing an object, be extra careful with initializer list, then clearly the language is too complicated.
Oh and one has to use exception if the constructor can fail, because there's no other way to express that.
If you don't want exception, then just go back to static method.
That just feels increditably awkward to me that anybody needs low-latency and high performance uses a strange subset of C++ without exceptions, RTTI and sometimes avoid constructor if the creation of an object can fail and it has become the de-factor standard for them to not use these parts of C++.
And if you want a vector that can take advantage of realloc/mremap, then you have to use folly's vector which specialise for POD and other registered types so that it is sure it is safe to use realloc/mremap.
Comment