set - 编译时已经知道函数类型
multiset<Sales_data, decltype(compareIsbn)*> bookstore(compareIsbn);shared_ptr -- 运行时绑定
shared_ptr<connection> sp1(&c, [c](){disconnection(&c);});shared_ptr<int> sp(new int[10], [](int* p){delete[] p;}); //用shared_ptr管理动态数组,需要提供一个删除器unique_ptr - 编译时已经知道函数类型
unique_ptr<connection, decltype<end_connection>*> p(&c, end_connection);
新闻热点
疑难解答