Swapping the Contents of n Variables—Paul Keir
▻http://isocpp.org/feeder/?FeederAction=clicked&feed=All+Posts&seed=http%3A%2F%2Fisocpp.org%2Fblog%2F2
Swapping arguments using a fold expression.
Swapping the Contents of n Variables by Paul Keir
From the article:
C++11’s std::swap is a binary function template which exchanges the contents of its two reference arguments. In C++20 std::swap will likely also permit execution at compile-time. In this post we consider a version which can swap the contents of an arbitrary number of arguments using a C++17 fold-expression...
#News,Articles&_Books,