This is a variant of the above that will determine the return type 'lazily', i.e. only if the function is enabled. This is useful when the return type isn't necessarily legal code unless the enabling condition is true.