aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Honermann <tom@honermann.net>2019-02-22 01:15:58 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2019-02-22 01:15:58 +0000
commit65bbaf3125f7c92be32e2e3b6c07e63e8ab0ccbc (patch)
tree4c914617a1ea1ad3dbf247bb2e3d2a2b0211c4f4
parentf08e60e9880be0ad53f7b3decc2cf8ee9377f5ac (diff)
downloadgcc-65bbaf3125f7c92be32e2e3b6c07e63e8ab0ccbc.zip
gcc-65bbaf3125f7c92be32e2e3b6c07e63e8ab0ccbc.tar.gz
gcc-65bbaf3125f7c92be32e2e3b6c07e63e8ab0ccbc.tar.bz2
Disambiguate __gnu_cxx::append_ partial specialization
This patch corrects ambiguous partial specializations of typelist::detail::append_. Previously, neither append_<chain<Hd, Tl>, Typelist_Chain> nor append_<Typelist_Chain, null_type> was a better match for append_<chain<Hd, Tl>, null_type>. 2019-02-22 Tom Honermann <tom@honermann.net> * include/ext/typelist.h: Constrain a partial specialization of typelist::detail::append_ to only match chain<T1,T2>. From-SVN: r269088
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/ext/typelist.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index fab28f4..904da1b 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2019-02-22 Tom Honermann <tom@honermann.net>
+
+ * include/ext/typelist.h: Constrain a partial specialization of
+ typelist::detail::append_ to only match chain<T1,T2>.
+
2019-02-21 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/89416
diff --git a/libstdc++-v3/include/ext/typelist.h b/libstdc++-v3/include/ext/typelist.h
index 2806814..a6223ae 100644
--- a/libstdc++-v3/include/ext/typelist.h
+++ b/libstdc++-v3/include/ext/typelist.h
@@ -215,10 +215,10 @@ namespace detail
typedef Typelist_Chain type;
};
- template<typename Typelist_Chain>
- struct append_<Typelist_Chain, null_type>
+ template<typename Hd, typename Tl>
+ struct append_<chain<Hd, Tl>, null_type>
{
- typedef Typelist_Chain type;
+ typedef chain<Hd, Tl> type;
};
template<>