fork(1) download
  1. #include <iostream>
  2.  
  3. template<typename X>
  4. struct S
  5. {
  6. typedef int func_t(X value);
  7.  
  8. template<typename F>
  9. struct Extract;
  10. template<typename F>
  11. struct Extract<int(F)>
  12. {
  13. typedef F type;
  14. };
  15. typedef typename Extract<func_t>::type xtype;
  16. };
  17.  
  18. void x() { std::cout << "x" << std::endl; }
  19.  
  20. int main()
  21. {
  22. S<void() volatile>::xtype z = &x;
  23. z();
  24. }
Runtime error #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
x