Document typeclasses as boolean metafunctions.
Fix bugs in the casting mechanism.
Add detail::dependent to make static asserts cleaner.