Strange 'No matching function for call' compila...
\ Yuanfei guo (27 Sep 2006)
. \ Yuanfei guo (28 Sep 2006)
. . \ Peter Doerfler (28 Sep 2006)

5 msgcompiling gcc 4.1.1 for AVR
2 msggfortran compiler precision
2 msgReading and writing binary files
2 msgAnother strict-alias puzzle with (unsigned) cha...
4 msgcannot exec 'cc1plus'
1 msgTest of subscribing
2 msgpeephole2
3 msgcross compilation
3 msgproblem building arm-linux-gcc
3 msgfunctors and callbacks
5 msgProblem with forward declaration of classes wit...
2 msg4.2 release date?
1 msgboehm-gc/misc.c compilation problem on cygwin
1 msgprintf-like syntax
4 msgExtending GNU C extensions
3 msgArguments in registers
2 msghelp: C++, SunStudio and gcc
3 msgPrevious definition of strdup
4 msgg++ -ldl
Subject:Strange 'No matching function for call' compilation error with G++ 4.1
Group:Gcc-help
From:Yuanfei guo
Date:27 Sep 2006


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)

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


© 2004-2008 readlist.com