https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71640

            Bug ID: 71640
           Summary: [7 Regression]
                    include/c++/7.0.0/bits/hashtable.h:293:7: error: too
                    many template parameters in template redeclaration
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
                CC: fdumont at gcc dot gnu.org
  Target Milestone: ---

clang complains:

In file included from /home/trippels/llvm/tools/llvm-config/llvm-config.cpp:32:
In file included from
/home/trippels/gcc_test/usr/local/include/c++/7.0.0/unordered_set:47:
/home/trippels/gcc_test/usr/local/include/c++/7.0.0/bits/hashtable.h:293:7:
error: too many template parameters in template redeclaration
      template<typename _Keya, typename _Valuea, typename _Alloca,
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/trippels/gcc_test/usr/local/include/c++/7.0.0/bits/unordered_set.h:96:18:
note: in instantiation of template class
'std::_Hashtable<std::__cxx11::basic_string<char>,
      std::__cxx11::basic_string<char>,
std::allocator<std::__cxx11::basic_string<char> >, std::__detail::_Identity,
std::equal_to<std::__cxx11::basic_string<char> >,
      std::hash<string>, std::__detail::_Mod_range_hashing,
std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy,
std::__detail::_Hashtable_traits<true, true,
      true> >' requested here
      _Hashtable _M_h;
                 ^
/home/trippels/llvm/tools/llvm-config/llvm-config.cpp:613:39: note: in
instantiation of template class
'std::unordered_set<std::__cxx11::basic_string<char>, std::hash<string>,
      std::equal_to<std::__cxx11::basic_string<char> >,
std::allocator<std::__cxx11::basic_string<char> > >' requested here
      std::unordered_set<std::string> FullDyLibComponents;
                                      ^
/home/trippels/gcc_test/usr/local/include/c++/7.0.0/bits/hashtable_policy.h:905:3:
note: previous template declaration is here
  template<typename _Key, typename _Value, typename _Alloc,
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

hashtable_policy.h:
 905   template<typename _Key, typename _Value, typename _Alloc,                
 906            typename _ExtractKey, typename _Equal,                          
 907            typename _H1, typename _H2, typename _Hash,                     
 908            typename _RehashPolicy, typename _Traits,                       
 909            bool _Constant_iterators =
_Traits::__constant_iterators::value>                                           
 910     struct _Insert;   

hashtable.h 
 293       template<typename _Keya, typename _Valuea, typename _Alloca,         
 294                typename _ExtractKeya, typename _Equala,                    
 295                typename _H1a, typename _H2a, typename _Hasha,              
 296                typename _RehashPolicya, typename _Traitsa,                 
 297                bool _Constant_iteratorsa, bool _Unique_keysa>              
 298         friend struct __detail::_Insert;  

Started with r236669.

Reply via email to