// Test that OLDOF macro allows to use C++11 auto declarations. #include #ifndef BOOST_NO_CXX11_AUTO_DECLARATIONS #include #include #include #endif int main() { #ifndef BOOST_NO_CXX11_AUTO_DECLARATIONS 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 // Else, nothing to test. return 0; }