fork download
  1. #include <iostream>
  2.  
  3. struct Foo; // forward declaration only
  4.  
  5. template<typename T>
  6. void Bar(T*, typename T::foo = 0) {
  7. std::cout << __PRETTY_FUNCTION__ << std::endl;
  8. }
  9.  
  10. void Bar(void*) {
  11. std::cout << __PRETTY_FUNCTION__ << std::endl;
  12. }
  13.  
  14. int main() {
  15. Bar((Foo*)NULL);
  16. }
  17.  
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
void Bar(void*)