boolean_type cleanup/code re-use
-fvisibility=hidden fixes on osx with -flto
less verbose ifdefs
use extern template to solve -fvisibility=hidden issues on osx