On 17/11/16 23:38 +0200, Ville Voutilainen wrote:
@@ -478,6 +478,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) noexcept(noexcept(__x.swap(__y))) { __x.swap(__y); } + +#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11 + template<typename _T1, typename _T2> + inline + typename enable_if<__not_<__and_<__is_swappable<_T1>, + __is_swappable<_T2>>>::value>::type + swap(pair<_T1, _T2>&, pair<_T1, _T2>&) = delete;
Is there any advantage to using __not_ here, rather than just: typename enable_if<!__and_<__is_swappable<_T1>, __is_swappable<_T2>>::value>::type ? __not_ is useful as a sub-expression of an __and_ / __or_ expression, but at the top level doesn't seem to buy anything, and is more typing, and requires indenting the code further.