moved union_cast into 'core' namespace.