智能指針之make_unique與make_shared

make_unique的實現 std::make_shared是C++11的一部分,可是std::make_unique很惋惜不是。它是在C++14里加入標準庫的,但咱們能夠本身實現make_unique方法。html // 支持普通指針 template<class T,class... Args> inline typename enable_if<!is_array<T>::value,un
相關文章
相關標籤/搜索