Add static assert to ensure reference types are not primitives.