The number of copy/move constructors is zero, by the way, it's not hard (well, could be one if you're using 1980s compilers)
In my recollection, smart pointers were a fairly common C++ idiom in the early 1990s. Ref-counted shared_ptr and scoped_ptr were even proposed in 1994 for standardization, but didn't quite make it (scoped_ptr mutated…
How is the reference for a library abandoned over 15 years ago even relevant? (other than when researching history)
The guide that's publicly available says "If your class needs to be copyable, prefer providing a copy method, such as CopyFrom() or Clone(), rather than a copy constructor" I think that's insane. Or, at the very least,…
> either people prefer both or prefer neither. exceptions (specifically, exceptions from constructors) are part of what RAII is, so it's only natural that people "prefer both". As another personal anecdote, in my…
It doesn't get any worse than that guide (except maybe EC++ or the FQA). No RAII, no class invariants, no value semantics, no streams, no operators (which means no custom Iterators, EqualityComparable or even…
The number of copy/move constructors is zero, by the way, it's not hard (well, could be one if you're using 1980s compilers)
In my recollection, smart pointers were a fairly common C++ idiom in the early 1990s. Ref-counted shared_ptr and scoped_ptr were even proposed in 1994 for standardization, but didn't quite make it (scoped_ptr mutated…
How is the reference for a library abandoned over 15 years ago even relevant? (other than when researching history)
The guide that's publicly available says "If your class needs to be copyable, prefer providing a copy method, such as CopyFrom() or Clone(), rather than a copy constructor" I think that's insane. Or, at the very least,…
> either people prefer both or prefer neither. exceptions (specifically, exceptions from constructors) are part of what RAII is, so it's only natural that people "prefer both". As another personal anecdote, in my…
It doesn't get any worse than that guide (except maybe EC++ or the FQA). No RAII, no class invariants, no value semantics, no streams, no operators (which means no custom Iterators, EqualityComparable or even…