- 73 名前:デフォルトの名無しさん mailto:sage [2012/07/27(金) 00:54:45.11 ]
- std::auto_ptr<float> x(new float(1.1)),y(new float(2.2)),z(new float(3.3));
std::cout << *x << " " << &(*x) << std::endl; boost::ptr_list<float> l; l.push_back(x); std::cout << &(*l.begin()) << std::endl; boost::ptr_list<float> l2(l.begin(),l.end()); std::cout << &(*l2.begin()) << std::endl; 全部同じアドレスがプリンとされるはずなのにされない lをl2にコピーする方法間違ってるの?
|

|