Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Maybe not the sort of "tip" you were looking for, but I have to say that my experience after a few years of moving from C++ &amp; STL to C++ &amp; boost &amp; STL is that I now spend a <em>lot</em> less time in GDB than I used to. I put this down to a number of things:</p> <ul> <li>boost smart pointers (particularly "shared pointer", and the pointer containers when performance is needed). I can't remember the last time I had to write an explicit delete (delete is the "goto" of C++ IMHO). There goes a lot of GDB time tracking down invalid and leaking pointers.</li> <li>boost is full of proven code for things you'd probably hack together an inferior version of otherwise. e.g <code>boost::bimap</code> is great for the common pattern of LRU caching logic. There goes another heap of GDB time.</li> <li>Adopting unittesting. <code>boost::test</code>'s AUTO macros mean it's an absolute doddle to set up test cases (<a href="http://gamesfromwithin.com/?p=29" rel="nofollow noreferrer">easier than CppUnit</a>). This catches lots of stuff long before it gets built into anything you'd have to attach a debugger to.</li> <li>Related to that, tools like <code>boost::bind</code> make it easier to design-for-test. e.g algorithms can be more generic and less tied up with the types they operate on; this makes plugging them into test shims/proxies/mock objects etc easier (that and the fact that exposure to boost's template-tasticness will encourage you to "dare to template" things you'd never have considered before, yielding similar testing benefits).</li> <li><code>boost::array</code>. "C array" performance, with range checking in debug builds.</li> <li>boost is full of great code you can't help but learn from</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload