add workaround for weird MSVC problem with cardinal_of