Is it possible to take two polymorphic objects and determine if they are of the same derived type (or class)? The intention is to use it as a clean way to filter a generic linked list.
Something like the following mock code.
function isSameType(a, b) result(itIs)
!arguments
class(*), intent(in) :: a
class(*), intent(in) :: b
!output
logical :: itIs
!return true if a and b are both the same type
!return false if a and b are not
end function isSameType