As follows from the comments, the answer to your question is the difference between "bool" (real Boolean type) and BOOL (MS typedef from int).
In the broader question, however, I did the same in the code. If you are on an MS platform, consider using _variant_t or CComVariant: both do basically what you want. I ended my own conversion class with a template that was passed by default to the base parent class (in this case _variant_t) and added specializations for constructor types that did not have a built-in conversion to the MS class type. You will need to add specializations for each type, for which there is no conversion in the base type, but usually this is not so bad.
I have to add:
The advantage of this method is that there will be no implicit conversion. If the type matches an explicit override, it will be used. Otherwise, it will match the pattern and be passed to the MS type. If the MS type cannot accept the passed type, you will get a compile-time error and know what you need to address.
source share