Adding static assertion, fixing unit test on MSVC