Must use 'set -e' in order to have tests fail properly.
Convert shared_ptr to a raw pointer for C++03.