Converting an object, variable or value from one type to another to satisfy a type restriction, without specifically requesting that conversion through language syntax.
I'd like to be able to implicitly convert between two classes which are otherwise incompatible. One of the classes is …
c# f# operator-overloading extension-methods implicit-conversionAs an exercise, I tried to create an implicit conversion that would accept a function and produce a Runnable. That …
scala runnable implicit-conversionWhy does this code raise a type mismatch error in Scala 2.9.2? I expected that getOrElse returns type String but actually …
scala implicit-conversion type-mismatchSay I'm writing an extension method implicit class EnhancedFoo(foo: Foo) { def bar() { /* ... */ } } Should you always include extends AnyVal in …
scala implicit-conversionMy class has an explicit conversion to bool: struct T { explicit operator bool() const { return true; } }; and I have an …
c++ implicit-conversionWhy is the 2nd assignment allowed, when the inferred return type is std::nullptr_t? With function pointers this is …
c++ lambda c++11 implicit-conversion std-functionI have this case class case class Person(val name: String) object JsonImplicits extends DefaultJsonProtocol { implicit val impPerson = jsonFormat1(Person) } …
scala akka implicit-conversion sprayI am trying to cast a String to Int using extractors. My code looks as follows. object Apply { def unapply(…
scala type-conversion implicit-conversion unapplyOkay. I've read this post, and I'm confused on how it applies to my example (below). class Foo { public static …
c# interface implicit-conversionThe pimp-my-library pattern allows me to seemingly add a method to a class by making available an implicit conversion from …
scala implicit-conversion implicits