Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cubbimew
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
cubbimew
11y ago
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)
2.
▲
by
cubbimew
11y ago
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 into auto_ptr). Th
3.
▲
by
cubbimew
12y ago
How is the reference for a library abandoned over 15 years ago even relevant? (other than when researching history)
4.
▲
by
cubbimew
12y ago
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, s
5.
▲
by
cubbimew
12y ago
> 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 experie
6.
▲
by
cubbimew
12y ago
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 CopyAssignable types! Such