Changed an assert to a static assert, to cause an error at compile time rather than runtime,