1. Object-oriented programming usually solves problems with explicit interfaces (function prototypes in classes) and run-time polymorphism (virtual functions and Rtti), but in the world of templates and generics programming, the importance of implicit interfaces and compile-time polymorphism is significantly increased, although explicit interfaces and runtime polymorphism still exist.
2. Usually explicit interfaces are composed of function signatures, and implicit excuses are not based on function declarations, but on valid expressions.
Implicit interfaces in the so-called generic programming refer to the operations involved in a type parameter inside a function template or member function within a class template. That is, the type parameter must support the operations within the function template, such as operator>,operator!=, and for different types, The specific behavior of operator> and other operations is not the same, its present behavior occurs in the compilation period, which together with the template in the compilation period to form a "compile-time polymorphism."
3. The implicit interface added to the template parameter, like an explicit interface added to a class object, is checked at compile time, so it is as if the object cannot be used in a way that "explicitly interfaces with classes" and cannot be used in the template. Objects that do not support the implicit interface required by template (both do not compile).
Effective C + + clause 41 Understanding implicit interface and compile-time polymorphism