Ticket #5098: result_of_test.patch

File result_of_test.patch, 1.9 KB (added by mimomorin@…, 12 years ago)

A patch against trunk (libs/utility/test/result_of_test.cpp)

  • libs/utility/test/result_of_test.cpp

     
    9898  unsigned int operator()();
    9999  unsigned short operator()() volatile;
    100100  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
    101106};
    102107
    103108template<typename T>
     
    108113  unsigned int operator()();
    109114  unsigned short operator()() volatile;
    110115  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
    111121};
    112122
    113123struct X {};
     
    232242  BOOST_STATIC_ASSERT((is_same<result_of<const no_result_type_or_result_of_template<void>(double)>::type, short>::value));
    233243  BOOST_STATIC_ASSERT((is_same<result_of<volatile no_result_type_or_result_of_template<void>(void)>::type, unsigned short>::value));
    234244  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));
    235252#endif
     253#endif
    236254
    237255  return 0;
    238256}