Talk:cpp/container/array/swap

Should the noexcept specifier of array::swap in the version until C++17 depend on std::swap(std::declval, std::declval) or just swap(std::declval, std::declval) (without the std:: before swap)? GCC 5 uses swap, not std::swap. Irgendwhy (talk) 14:45, 4 January 2017 (PST)
 * This is a tricky one. The version without `std::` is actually ill-formed - the lookup for finds the member  and stops there (see LWG issue 2456). Clang even has a special hack just for libstdc++ headers doing this. However, the `std::` version isn't right either because it suggests the absence of ADL. T. Canens (talk) 15:29, 4 January 2017 (PST)