[algorithms][assign] Fix static assert checks on older compilers.

Revert the change done previously but use static keyword.