#ifndef SWAP_H #define SWAP_H //T must be copy constructable and assignable. template void swap(T& a, T& b) { const T temp {a}; a = b; b = temp; } #endif