<p>These are just a couple of notes for some neat tips and tricks I’ve discovered over the years when using <a href="http://www.boost.org/doc/libs/1_56_0/libs/test/doc/html/index.html">Boost.Test</a>. They may not be all that useful to everybody else but they’re the ones I tend to forget about and then end up rediscovering. I’m using most of these with recent versions of Boost and these were tested with 1.54.</p>
<p>Quick hack/warning for those using an alternative command line processor like <a href="https://jpsoft.com/tccle-cmd-replacement.html">TCC</a> and also use Xoreax’ <a href="https://www.incredibuild.com/">Incredibuild</a> for distributed builds. Incredibuild is awesome, by the way, and if you have a larger C++ project that takes a long time to build, you should use it. And no, I’m not getting paid or receive free stuff for writing that.</p>
<p>As VS2012’s C++ compiler doesn’t support “true” variadic templates, the new runtime library classes that use variadic templates are implemented using macro magic behind the scenes. In order to get the “variadic” templates to accept more than the default of five parameters, you’ll have to set _VARIADIC_MAX to the desired maximum number of parameters (between five and ten).</p>
<p>I was profiling some code a while ago that makes extensive use of boost::variant and one of the lessons from the profiler run was that boost variants appear to be fairly expensive to construct and copy.</p>
<p>There, I’ve said it. No tiptoeing around.</p>