This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36642] New: Problem with non matching template args in tr1_impl/hashtable
- From: "jeff dot sullivan at intel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2008 19:22:20 -0000
- Subject: [Bug c++/36642] New: Problem with non matching template args in tr1_impl/hashtable
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I think there may be two issues here demonstrated in the code below. The
example code is distilled from ./include/c++/4.3.0/tr1_imp/hashtable. GCC
compiles this code without a diagnostic, but both the Intel and Microsoft
compilers diagnose an error with too few template args for __detail::_Map_base'
:
% cl -c t.cpp -nologo
t.cpp
t.cpp(10) : error C2976: '__detail::_Map_base' : too few template arguments
t.cpp(4) : see declaration of '__detail::_Map_base'
% cat t.cpp
namespace __detail
{
template<typename _Key, typename _Value, typename _Ex, bool __unique,
typename _Hashtable> struct _Map_base { };
}
struct _Hashtable
{
template<typename _Key2, typename _Pair, typename _Hashtable>
friend struct __detail::_Map_base;
};
So, you may want to fix the template in <tr1_imp/hashtable> and/or try to
diagnose this case in the compilation.
--
Summary: Problem with non matching template args in
tr1_impl/hashtable
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jeff dot sullivan at intel dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36642