4 ms·
Why on Earth are you writing a statement like that in the first place?
by coldpie 13y ago
Why on Earth are you writing a statement like that in the first place?
- ben0x539 13y agoIt's probably less about writing the statement while cackling maniacally and more about recognizing that pattern in less obvious examples in existing code while reviewing it or looking for a bug, and realizing that it might be worth investigating and not just a style nitpick.
- praptak 13y agoExaggerated example to show a pattern. A (hopefully) less outrageous (but still bad!) example of the dangers of sequencing: foo(std::unique_ptr<T1>{new T1 }, std::unique_ptr<T2>{new T2 }); This one's from GotW #102.
- alok-g 13y agoThanks. Just read the GotW. http://herbsutter.com/gotw/_102/ http://herbsutter.com/gotw/_102/