![]() |
От: | Аноним | |
Дата: | 04.07.08 11:11 | ||
Оценка: |
template<class Y, class D> shared_ptr(Y * p, D d);
у auto_ptr такого конструктора нет. class deleter{
public:
void operator()(A *r){
//...
}
};
int main(){
shared_ptr<A> sp(new A,deleter());
auto_ptr<A> sp(new A,deleter());//нет конструктора - ошибка
//error C2661: 'std::auto_ptr<_Ty>::auto_ptr' : no overloaded function takes 2 arguments
return 0;
}