fork download
  1. #include <iostream>
  2. #include <type_traits>
  3.  
  4. using namespace std;
  5.  
  6. struct A
  7. {
  8. int f()&&
  9. {
  10. return 0;
  11. }
  12. };
  13.  
  14. template<typename T1, typename T2>
  15. constexpr bool is_same_v = std::is_same<T1, T2>::value;
  16.  
  17. int main() {
  18. auto ptr = &A::f;
  19. //std::cout<<is_same_v<decltype(ptr), int()> <<" "<< is_same_v<decltype(ptr), int(A::*)()>;
  20. return 0;
  21. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
Standard output is empty