[Bug c++/15998] typo for std::mem_fun1 in include file stl_function.h
pcarlini at suse dot de
gcc-bugzilla@gcc.gnu.org
Tue Jun 15 13:19:00 GMT 2004
------- Additional Comments From pcarlini at suse dot de 2004-06-15 13:19 -------
Not a bug: mem_fun1 (at variance with mem_fun1_t, for instance) is not part
of the ISO Standard and has been moved to the <ext/functional> header inside
the __gnu_cxx namespace. Indeed, the below compiles for me. Thanks.
///////////
#include <functional>
#include <algorithm>
#include <vector>
#include <ext/functional>
class Apple
{
public:
void Aggregate(int);
};
void foo(const std::vector<Apple*>& apples)
{
int n = 5;
std::for_each(apples.begin(), apples.end(),
std::bind2nd(__gnu_cxx::mem_fun1<void,
Apple, int>(&Apple::Aggregate), 5));
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15998
More information about the Gcc-bugs
mailing list