On Mon, Apr 04, 2011 at 11:14:24PM -0400, Luke Faraone wrote:
> src/listmenumgr.cpp: In member function 'void
> ChipW::ListMenuManager::AddMenu(wxMenu*)':
> src/listmenumgr.cpp:42:70: error: no matching function for call to
> 'min(std::vector<wxString, std::allocator<wxString> >::size_type,
> unsigned int)'

Both the arguments to std::min() need to be the same type, or else the
compiler can't deduce the type to use in the template.  I suspect this
code will compile on a 32-bit platform (where size_type is likely to
be equivalent to unsigned int) but not on a 64-bit platform when
size_type is 64 bit but unsigned int is 32 bit.

Without having looked at the code in this case, the simplest fix in
general is probably to explicitly tell the compiler the type to use -
for example replacing:

    min(v.size(), n)

with something like:

    min<std::vector<wxString>::size_type>(v.size(), n)

Cheers,
    Olly



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to