I have a class Small and a class Big I create a variable Small in the Big class Small small and in the Small class
char_traits
int operator()(int a) { return a; } — whats the oprator() doing there?
it's a fairly simple one
it's overloading operator()
it's a function call operator
then you can call the function operator on instances of that class
ohh.. ok sorry, forgot i can oveload () operator
Note that you just need to declare the class template for the general case (before you specialize), not define it.
Class obj;
obj(10);
struct S{ int operator()(int a){ return a; }}; int main(){S s; std