Merge "Ignore bool cast warning for MSVC and C++" into release-4-6