Now i can test code for exception safety:

template<class T1, class T2>
void algo(
    boost::shared_ptr<T1> x,
    boost::shared_ptr<T2> y);

typedef mock_object<> Mock;
typedef boost::shared_ptr<Mock> SharedMock;

BOOST_TEST_EXCEPTION_SAFETY( fail_test )
  {
  algo(
    SharedMock( new Mock() ),
    SharedMock( new Mock() ));
  }

BOOST_TEST_EXCEPTION_SAFETY( success_test )
  {
  algo(
      boost::make_shared<Mock>(),
      boost::make_shared<Mock>());
  }

Very useful tool!

--
Regards, Andrey