Use different memoize if the type is not default constructible.