>> Exactly. how does one fix that? Like I mentioned, we rewrote the swap function, but we also had to change the operator<
Yep, thats the way to do it.
>> Exactly. how does one fix that? Like I mentioned, we rewrote the swap function, but we also had to change the operator<
Yep, thats the way to do it.
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
>> we rewrote the swap function
How?
Try iter_swap
Code:template<class _FwdIt1, class _FwdIt2> inline void iter_swap(_FwdIt1 _Left, _FwdIt2 _Right) { // swap *_Left and *_Right std::swap(*_Left, *_Right); }
You don't have to add the const modifiers, the template takes care of that for you.Originally posted by Cat
That won't work without ptr_fun() around it; myCompare is not a functor here.
The other code works much better, but a few changes to make it const-correct (you can get a lot of bizarre error messages if it's not):
[/code]
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
>>> You don't have to add the const modifiers, the template takes care of that for you.
Not necessarily. GCC gave me errors for not having the last const when I used that last week.
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.