src.rt.cast_.d is where all the magic lays. It's a surprisingly small amount of code compared to what I've seen once in the GCC C++ RT library codebase.