fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. template <typename T>
  6. int foo(T t) { t.foo(); }
  7.  
  8. int main()
  9. {
  10. decltype(foo(int{ 13 })) fail = 42;
  11.  
  12. cout << fail << endl;
  13. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
42