Cool trick but why wouldn't you just put the Log method without the ifdef in the header, and put the conditionally compiled bits in a .cpp file? The method in the article already puts both Widget<true> and Widget<false> in a .cpp file.