functional (__is_socketlike): Change from class template to alias template.
authorJonathan Wakely <jwakely.gcc@gmail.com>
Mon, 26 Nov 2012 23:53:36 +0000 (23:53 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 26 Nov 2012 23:53:36 +0000 (23:53 +0000)
* include/std/functional (__is_socketlike): Change from class
template to alias template.

From-SVN: r193832

libstdc++-v3/ChangeLog
libstdc++-v3/include/std/functional

index f7f43fefef6fe135d95fcebe224c53d037591356..c6d0687eb7b04586cda7c109e3f6bb98ec5b8877 100644 (file)
@@ -1,3 +1,8 @@
+2012-11-26  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       * include/std/functional (__is_socketlike): Change from class
+       template to alias template.
+
 2012-11-26  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        PR libstdc++/55463
index 1a98127f4e2c8ca5dde30b0192a1463c550f547a..0d8fbd6bdae7c41b19a233d4a1341b64f4d70363 100644 (file)
@@ -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<typename _Tp>
-    class __is_socketlike
-    {
-      typedef typename decay<_Tp>::type _Tp2;
-    public:
-      static const bool value =
-       is_integral<_Tp2>::value || is_enum<_Tp2>::value;
-    };
+  template<typename _Tp, typename _Tp2 = typename decay<_Tp>::type>
+    using __is_socketlike = __or_<is_integral<_Tp2>, is_enum<_Tp2>>;
 
   template<bool _SocketLike, typename _Func, typename... _BoundArgs>
     struct _Bind_helper