|
Boost Testing : |
Subject: [Boost-testing] A question on the return value . Can anyone with kindness help me?
From: fmingu (fmingu_at_[hidden])
Date: 2009-06-27 00:59:48
I am using Dev-C++ and lambda, the program is the following:
..................
typedef std::map<int, int> IIPrimemap;
IIPrimemap primemapvec;
..............
bind(&IIPrimemap::lower_bound, primemapvec,3);
..................
But the complier told me that:
cannot resolve overloaded function `lower_bound' based on
conversion to type `unsigned int'
but when I type :
bind(&IIPrimemap::count, primemapvec,3);
it is accepted by the complier.
I searched through the SGI STL help file,and find that there are two types of return value for IIPrimemap::lower_bound: iterator and const_iterator. And there is only one type of return value for IIPrimemap::count: size_type.Maybe that is the reason.
But how can I solve the problem. Can anyone with kindness help me?