由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - c++太神奇了
相关主题
C++的smart pointer注定是个二流的东西把一个function pointer作为参数传入一个function的语法是什么?
about STL functor and function pointerscan you insert several function pointers into a queue ?
function pointer 和 call-back function 有什么区别?c++ question
来几个C++测试题听说pointer to member function只支持最多128个virtual functi
pointer to override function?C++ Function Pointer Array 的问题
Question: Given a pointer to a function关于Function Pointer的简单问题,望指教
a c++ questionfunction in c++
pointer to functionC++ Q90 - Q92 (转载)
相关话题的讨论汇总
话题: function话题: pointer话题: class话题: member话题: 神奇
进入Programming版参与讨论
1 (共1页)
s*******t
发帖数: 2896
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.
m*****e
发帖数: 4193
2
Or we can say it's too complicated. Even such a simple matter would have to
be explained by a book.

【在 s*******t 的大作中提到】
: 看了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.

o****e
发帖数: 92
3
呵呵,没用过 STL 做 functional programming 么
pointer to member function 效率比较低,mem_fun(ptr_fun) 还不如 FunObject()

【在 s*******t 的大作中提到】
: 看了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.

1 (共1页)
进入Programming版参与讨论
相关主题
C++ Q90 - Q92 (转载)pointer to override function?
菜鸟问个C++问题Question: Given a pointer to a function
这个function pointer最后的那个int是什么意思?a c++ question
请教大家一道C的面试题pointer to function
C++的smart pointer注定是个二流的东西把一个function pointer作为参数传入一个function的语法是什么?
about STL functor and function pointerscan you insert several function pointers into a queue ?
function pointer 和 call-back function 有什么区别?c++ question
来几个C++测试题听说pointer to member function只支持最多128个virtual functi
相关话题的讨论汇总
话题: function话题: pointer话题: class话题: member话题: 神奇