Use static assert in closure.