Just to establish something quickly here...
I definitely cannot use function adaptors to alter the interface to regular predicate functions. Only if my predicate function is a function object. Correct?
Just to establish something quickly here...
I definitely cannot use function adaptors to alter the interface to regular predicate functions. Only if my predicate function is a function object. Correct?
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
>Correct?
Sort of. You can do it by using ptr_fun, mem_fun, and friends. But technically, implementation-wise you can't because even the interfaces provided will wrap your function within a function object for actual use by the adapter.
My best code is written with the delete key.
Ok. Thanks Prelude. I was having an hard time interpreting the compiler errors. I was unsure if my design of the unary pred was flawed or if it had to do with the expected parameters to bind2nd(). Had to check.
A function object solved my problem and even removed the need for the adaptor.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.