// Test that OLDOF macro allows to use C++11 auto declarations. #include #include #include #include #include int main() { #ifdef BOOST_NO_CXX11_AUTO_DECLARATIONS std::cout << "No C++11 auto declarations (nothing to test)" << std::endl; #else int x = 0; auto old_x = BOOST_CONTRACT_OLDOF(x); BOOST_STATIC_ASSERT(boost::is_same >::value); boost::contract::virtual_* v = 0; char y = 'a'; auto old_y = BOOST_CONTRACT_OLDOF(v, y); BOOST_STATIC_ASSERT(boost::is_same >::value); #endif return 0; }