* [patch] tweak std::bind constraint
@ 2012-11-26 23:53 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2012-11-26 23:53 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 148 bytes --]
* include/std/functional (__is_socketlike): Change from class
template to alias template.
Tested x86_64-linux, committed to trunk.
[-- Attachment #2: patch2.txt --]
[-- Type: text/plain, Size: 1160 bytes --]
commit 634c004b52c86148e1719e20744504816374dfdb
Author: Jonathan Wakely <jwakely.gcc@gmail.com>
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<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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-26 23:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-26 23:53 [patch] tweak std::bind constraint Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).