scoped_ptrでメンバ変数

なんかもう「Boost使っちゃいYo!」って気がしてきた。

#include <iostream>
#include <string>
#include <boost/scoped_ptr.hpp>

using namespace std;

class Child {
public:
  Child() {
    cout << "Child::new(): " << this << endl;
  }

  ~Child() {
    cout << "Child#delete(): " << this << endl;
  }
};


class Parent {
  boost::scoped_ptr<Child> child_;

public:
  Parent() : child_(new Child) {}
};

int main() {
  cout << "begin" << endl;
  Parent* parent = new Parent;
  cout << "in processing" << endl;
  delete parent;
  cout << "end" << endl;
  return 0;
}


begin
Child::new(): 00396150
in processing
Child#delete(): 00396150
end
続行するには何かキーを押してください . . .

tr1にはscoped_ptrは含まれていないのかなぁ?
わりと使いそうなもんだけど…と思ったけどそうでもないか。