I have tried the following
def test[Option[T]: Ordering](value1: Option[T], value2: Option[T]) = {
val e = implicitly(Ordering[Option[T]].compare(value1, value2))
}
but does not work ? Any idea what's the issue ?
EDIT
This of course works
def test[T](value1: Option[T], value2: Option[T]) (implicit ev: Ordering[Option[T]]) = {
ev.compare(value1, value2)
}
If you really insist on using a context bound you can write a type lambda:
Or with the kind-projector plugin you should be able to make this a bit cleaner: