|
|
|
|
|
by imron
3287 days ago
|
|
> you're not going to be using features that haven't actually been published in a formal standard (optional). So you then have things like: class Foo
{
public:
static Foo* create();
...
};
...
Foo* foo = Foo::create()
if ( foo != nullptr ) ...
> so how do you have Containers of foo?std::vector<Foo*> Not saying either of those are better than the alternative (I prefer using exceptions and RAII), just pointing out what I've seen in real world projects. |
|
This has a further benefit for testing, since you can use your major objects without fully initializing the entire world that they depend on.