Several functions moved from std::cast to std::mem