Open
Description
I want to be able to define a function that behaves like, for example, the intrinsic SIZE
function, where the kind of the output is specified by an optional input. Am I correct that this currently isn't possible?
Maybe using something similar to @cmacmackin's parameterized function syntax from #4, combined with a better way to specify the default value of optional arguments (see also #22):
function my_class_size(me, kind=INT32) result(s)
class(my_class) :: me
integer,intent(in),optional,kind :: kind
integer(kind) :: s
...
end function my_class_size
See also #78, and also the various issues about generic programming and templates.