0

Possible Duplicate:
Is it possible to write a C++ template to check for a function's existence?

I'm trying to do a sort of a compile time duck-typing. I want to call the method if T has it, otherwise do nothing. This could be implemented as template function that does nothing, with a specialization that calls the method. But how to select the specialization only if T has a foo()?

Community
  • 1
  • 1
Eloff
  • 19,807
  • 16
  • 74
  • 103

0 Answers0