Boost logo

Boost Users :

Subject: Re: [Boost-users] Compilation/syntax error Boost.Lambda
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-02-05 10:50:55


AMDG

Joost Kraaijeveld wrote:
> The code below does not compile and gives me 2 errors that, whatever I
> try, do not want to disappear. What am I doing wrong?
>
> The errors:
>
> g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Main.d" -MT"Main.d" -o"Main.o" "../Main.cpp"
> ../Main.cpp: In function ‘std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > getObjects(const Predicate&)’:
> ../Main.cpp:34: error: no matching function for call to ‘bind(<unresolved overloaded function type>,
>
> <snip>
>
> bind(&map<string, string>::insert,

insert is overloaded and the compiler doesn't know which one you mean.
You'll need to cast it to the right type.
See also http://www.gotw.ca/gotw/064.htm

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net