Files
contract/test/oldof/no_make_old-error.cpp
2015-10-25 09:33:05 -07:00

13 lines
293 B
C++

// Test error when make_old(...) not used by mistake.
#include <boost/contract/old.hpp>
int main() {
int x = 1;
boost::contract::old_ptr<int> old_x = boost::contract::copy_old() ? x :
boost::contract::null_old(); // Error (missing outer make_old(...)).
return 0;
}