Disambiguate __gnu_cxx::append_ partial specialization
authorTom Honermann <tom@honermann.net>
Fri, 22 Feb 2019 01:15:58 +0000 (01:15 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 22 Feb 2019 01:15:58 +0000 (01:15 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/typelist.h

index fab28f42079658f6906656b2c08b078c76a756b4..904da1ba4c9036f650d83673790a95ec2008e369 100644 (file)
@@ -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
index 2806814028a41110685d7224dc7d2896b26e48b4..a6223aeb2721c48b5224eb5a82ef8a6572c5bc02 100644 (file)
@@ -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<>