This version causes the compiler to crash in MSVC, using conditional compilation here instead