Ticket #5098: result_of_test.patch
File result_of_test.patch, 1.9 KB (added by , 12 years ago) |
---|
-
libs/utility/test/result_of_test.cpp
98 98 unsigned int operator()(); 99 99 unsigned short operator()() volatile; 100 100 const unsigned short operator()() const volatile; 101 #if !defined(BOOST_NO_RVALUE_REFERENCES) 102 short operator()(int&&); 103 int operator()(int&); 104 long operator()(int const&); 105 #endif 101 106 }; 102 107 103 108 template<typename T> … … 108 113 unsigned int operator()(); 109 114 unsigned short operator()() volatile; 110 115 const unsigned short operator()() const volatile; 116 #if !defined(BOOST_NO_RVALUE_REFERENCES) 117 short operator()(int&&); 118 int operator()(int&); 119 long operator()(int const&); 120 #endif 111 121 }; 112 122 113 123 struct X {}; … … 232 242 BOOST_STATIC_ASSERT((is_same<result_of<const no_result_type_or_result_of_template<void>(double)>::type, short>::value)); 233 243 BOOST_STATIC_ASSERT((is_same<result_of<volatile no_result_type_or_result_of_template<void>(void)>::type, unsigned short>::value)); 234 244 BOOST_STATIC_ASSERT((is_same<result_of<const volatile no_result_type_or_result_of_template<void>(void)>::type, const unsigned short>::value)); 245 #if !defined(BOOST_NO_RVALUE_REFERENCES) 246 BOOST_STATIC_ASSERT((is_same<result_of<no_result_type_or_result_of(int&&)>::type, short>::value)); 247 BOOST_STATIC_ASSERT((is_same<result_of<no_result_type_or_result_of(int&)>::type, int>::value)); 248 BOOST_STATIC_ASSERT((is_same<result_of<no_result_type_or_result_of(int const&)>::type, long>::value)); 249 BOOST_STATIC_ASSERT((is_same<result_of<no_result_type_or_result_of_template<void>(int&&)>::type, short>::value)); 250 BOOST_STATIC_ASSERT((is_same<result_of<no_result_type_or_result_of_template<void>(int&)>::type, int>::value)); 251 BOOST_STATIC_ASSERT((is_same<result_of<no_result_type_or_result_of_template<void>(int const&)>::type, long>::value)); 235 252 #endif 253 #endif 236 254 237 255 return 0; 238 256 }