Suppose I have such template:
template<class T>
class A
{
...
};
I want this template can be specialized only if type which will be substituted in place of T have certain interface. For example, this type must have such two methods:
int send(const char* buffer, size_t size);
int receive(char* buffer, size_t size);
How can i make this restrictions on the template? Thanks for the help!
UPD:
This question is about SFINAE? not about inheretince or class design.