I am trying to use some sample code and my compiler won’t compile this line:
static void exitActions(Host& h, Bool<true>) {}
Compiler is MS VS2005. I don’t recognise Bool – so not sure how to replace it. Is this default parameter equivalent:
static void exitActions(Host& h, bool b = true) {}
The sample is from http://accu.org/index.php/journals/252. The code is just snippets in the text – no snippet about what is #include’d – so hard to work out. There is no definition for a Bool template.
I guess
Boolis defined likeYou can use this for some rudimentary pattern matching:
This of course only makes sense if you overload
Bool<true>withBool<false>. But in the source http://accu.org/index.php/journals/252 (guessed by Marcin), this is the case.There is also a similar function call