Famously in Haskell if we have a function without a concrete type we can deduce something about its behavior, for example
f : a -> a
will always be the identity.
With Java Generics we cannot prove that generic functions have a certain behavior since we can use instanceof or the methods on the Object base class to work around the restrictions, however if I see a method with the signature
<T> List<T> reverse(List<T> list)
it is reasonable to assume that the function won't use any properties of the type T.
The type signature of a templated C++ function does not appear to offer any hints about its implementation. Is there any feature, existing or suggested for the standard, that would allow us to write function signatures affording similar deductions in C++? For example, some way to say "This function works for absolutely any type".