| 359 | typename T |
| 360 | > |
| 361 | void exchange ( |
| 362 | T& a, |
| 363 | T& b |
| 364 | ) |
| 365 | /*! |
| 366 | This function does the exact same thing that global swap does and it does it by |
| 367 | just calling swap. But a lot of compilers have problems doing a Koenig Lookup |
| 368 | and the fact that this has a different name (global swap has the same name as |
| 369 | the member functions called swap) makes them compile right. |
| 370 | |
| 371 | So this is a workaround but not too ugly of one. But hopefully I can get |
| 372 | rid of this in a few years. So this function is already deprecated. |
| 373 | |
| 374 | This also means you should NOT use this function in your own code unless |
| 375 | you have to support an old buggy compiler that benefits from this hack. |
| 376 | !*/ |
| 377 | { |
| 378 | using std::swap; |
| 379 | using dlib::swap; |
| 380 | swap(a,b); |
| 381 | } |
| 382 | |
| 383 | // ---------------------------------------------------------------------------------------- |
| 384 |
no test coverage detected