Open GuillaumeDua opened 9 months ago
// replace template <typename, typename, typename> struct replace; template <template <typename ...> typename pack, typename ... Ts, typename old_t, typename new_t> struct replace<pack<Ts...>, old_t, new_t> : std::type_identity< pack< std::conditional_t< std::is_same_v<Ts, old_t>, new_t, Ts >... > >{}; template <typename pack, typename old_t, typename new_t> using replace_t = replace<pack, old_t, new_t>::type;