Hi there,

I am porting some code to SUSE 10, with G++ 4.1. And hit an strange
"no matching function call" compilation error.  I am confused because
the calling function and candidate are nearly 100% same.

I wonder if this is a known G++ limitation or issue ? Because the same
program got compiled with VC8.

Below is the compilation environment info and compilation error.

 env info
=========
g++ (GCC) 4.1.0  (SUSE Linux 10), note that this issue can also be found at G++
3.2(UL1.0)

No compile option is added


Compilation error
==============
 ./Cache/CacheManager.h:424: error: no matching function for call to
tdat_hash_map<std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> >, Element<unsigned int, SqlObjectDefn,
std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> > >*,
MemAllocator<std::pair<std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >, Element<unsigned
int, SqlObjectDefn, std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > >*> >
>::tdat_hash_map1(MemAllocator<std::pair<std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >, Element<unsigned
int, SqlObjectDefn, std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > >*> >, int)

./Common/TdatHashMap.h:250: note: candidates are: static void
tdat_hash_map<_Key, _Tp, _AllocType>::tdat_hash_map1(_AllocType&, int)
[with _Key = std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> >, _Tp = Element<unsigned int, SqlObjectDefn,
std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> > >*, _AllocType =
MemAllocator<std::pair<std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >, Element<unsigned
int, SqlObjectDefn, std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > >*> >]



Any comments/suggestions are higly appreciated.

Thanks,
-Kelvin


-- 
           Summary: Strange "No matching function for call" compilation
                    error with G++ 4.1
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yuanfei8077 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29252

Reply via email to