I posted it many topics and I'm sorry if someone think that I'm abusing but I really want that my posts are acceptable and readable. As it my english is absolutely bad.
So, I'm waiting some criticisms about it. If you think I should explain something else, or what I explained is bad or a fail. Please told me.
Think that I did an itrodution, so the topic shouldn't go much deeper.
class foo{
public:
T this_is_a_member_function();
};
I think that using 'apply' against an array will be more interesting (like std::accumulate)
return (a%2)? false : true; Don't do that. It's obfuscated.
You already have a boolean value in the condition, use that return a%2 == 0;
There is also another issue, that function is not partial order. If both arguments are even, it will return true
So a<b and b<a (that can't happen).
1 2 3
bool isPair (int a, int b){ //terrible name you choose there
return a>b? true : false; //...
}