From patchwork Mon Nov 26 23:53:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: tweak std::bind constraint Date: Mon, 26 Nov 2012 13:53:40 -0000 From: Jonathan Wakely X-Patchwork-Id: 202046 Message-Id: To: "libstdc++" , gcc-patches * include/std/functional (__is_socketlike): Change from class template to alias template. Tested x86_64-linux, committed to trunk. commit 634c004b52c86148e1719e20744504816374dfdb Author: Jonathan Wakely Date: Sun Nov 25 22:01:28 2012 +0000 * include/std/functional (__is_socketlike): Change from class template to alias template. diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index 1a98127..0d8fbd6 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -1503,14 +1503,8 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) // Trait type used to remove std::bind() from overload set via SFINAE // when first argument has integer type, so that std::bind() will // not be a better match than ::bind() from the BSD Sockets API. - template - class __is_socketlike - { - typedef typename decay<_Tp>::type _Tp2; - public: - static const bool value = - is_integral<_Tp2>::value || is_enum<_Tp2>::value; - }; + template::type> + using __is_socketlike = __or_, is_enum<_Tp2>>; template struct _Bind_helper