Code below, I know is bad code, but is not even what I'm trying to achieve, that code is only an "excuse" to understand what can I do with the classes from the functional header and algorithm.
Now the code below binds num which is 12 to the modulus<int> class and check all the numbers in the vector nums against it, thus 12 % n, problem is that modulus return 0 when a number is factor of 12 so it only copy numbers that are NOT factors of 12 in the vector factors.
So my question is, there is a way to obtain the opposite return type from modulus<int> without having to use a lambda?
Like can I do some trickery using negate<bool> or something on those lines?
Or maybe a copy_if_not algorithm? (though I don't think there is one)