due to C++ do not support multi-dispatch, rewrite deep_copy()