c++太神奇了# Programming - 葵花宝典
s*t
1 楼
看了TCPL的intro部分,太tmd神奇了。
mem_fun() accepts a pointer to a member function of some class as its
arugment, then generates a function that takes an object of that class as
its argument.
that means, a pointer to a member function of some class is in fact not a
pointer to a function, instead, it contains information of both the class
and the member function.
mem_fun() accepts a pointer to a member function of some class as its
arugment, then generates a function that takes an object of that class as
its argument.
that means, a pointer to a member function of some class is in fact not a
pointer to a function, instead, it contains information of both the class
and the member function.