??xml version="1.0" encoding="utf-8" standalone="yes"?>日本高清无卡码一区二区久久 ,女人高潮久久久叫人喷水,久久久久久无码国产精品中文字幕 http://www.shnenglu.com/skyscribe/category/10931.htmlzh-cnSun, 09 May 2010 17:01:23 GMTSun, 09 May 2010 17:01:23 GMT60GCC4.5的profile modehttp://www.shnenglu.com/skyscribe/archive/2010/05/09/GCC4_5ProfileMode.htmlskyscribeskyscribeSun, 09 May 2010 07:16:00 GMThttp://www.shnenglu.com/skyscribe/archive/2010/05/09/GCC4_5ProfileMode.htmlhttp://www.shnenglu.com/skyscribe/comments/114920.htmlhttp://www.shnenglu.com/skyscribe/archive/2010/05/09/GCC4_5ProfileMode.html#Feedback0http://www.shnenglu.com/skyscribe/comments/commentRss/114920.htmlhttp://www.shnenglu.com/skyscribe/services/trackbacks/114920.htmlq里Q,
q增加了一个新的profile模式Q尚处于试验阶段Q,可以ҎE序q行状态给出关于STL使用的一些优化徏议?br>
参看如下的描qͼ
  • An experimental profile mode has been added. This is an implementation of many C++ standard library constructs with an additional analysis layer that gives performance improvement advice based on recognition of suboptimal usage patterns. For example,

    #include <vector>
    int main()
    {
    std::vector<int> v;
    for (int k = 0; k < 1024; ++k)
    v.insert(v.begin(), k);
    }

    When instrumented via the profile mode, can return suggestions about the initial size and choice of the container used as follows:

    vector-to-list: improvement = 5: call stack = 0x804842c ...
    : advice = change std::vector to std::list
    vector-size: improvement = 3: call stack = 0x804842c ...
    : advice = change initial container size from 0 to 1024

    These constructs can be substituted for the normal libstdc++ constructs on a piecemeal basis, or all existing components can be transformed via the -D_GLIBCXX_PROFILE macro.

q个profile mode的主要作用就是根据代码实际运行状늻出关于STL的用优化徏议。有炚w憄是,该profileҎ是intrusive的,必须d-D_GLBCXX_PROFILE来重新编译所有的代码?br>
Profile mode的提出源?9qCGO的一?a >paperQ作者里边出C华h的名字(Ҏ拼音来判断);作者地址填的昄是Purdue大学的:
    Dept. of Comput. Sci., Purdue Univ., West?br>
GCC的Profiler对C++的支持一贯停留在和C同样的水qI׃C++模板机制和OO的存在得很多时候分析profilingl果的意义被大大削弱?br>q个针对STL的profile modeq是很值得期待的?br>



skyscribe 2010-05-09 15:16 发表评论
]]>
boost.cmake: 方便解决boost的升U问?/title><link>http://www.shnenglu.com/skyscribe/archive/2010/05/09/114919.html</link><dc:creator>skyscribe</dc:creator><author>skyscribe</author><pubDate>Sun, 09 May 2010 06:59:00 GMT</pubDate><guid>http://www.shnenglu.com/skyscribe/archive/2010/05/09/114919.html</guid><wfw:comment>http://www.shnenglu.com/skyscribe/comments/114919.html</wfw:comment><comments>http://www.shnenglu.com/skyscribe/archive/2010/05/09/114919.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/skyscribe/comments/commentRss/114919.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/skyscribe/services/trackbacks/114919.html</trackback:ping><description><![CDATA[以前常用boost的一些库Q由于项目自w用cmakel织build?br>boost每次升之后Q重新用bjam~译一ơ都很是不便Q某些^収ͼ用默认选项~译有些问题Q基本安装不成功Q?br><br>最q才发现boost的cmake版本已经独立出来了,对于使用cmake的用戯言Q这里是个不错的选择?br>目<a >主页</a>的文档很是清晎ͼ最新的版本?.41 (版本号对应的基本是其upstream的boost版本??br>源代码是用gitl织的,对于Linux用户而言更加方便?br><br>引用其主上的一句话Q?br> <div style="margin-left: 40px;">Boost.<a class="reference external" >CMake</a> (or <a class="reference internal" ><em> alt.boost</em> </a>) is the boost distribution that all the cool kids are using. </div> <br>CMake + <a >GIT</a> +<a >Spinx</a> 实够酷了?br><br><span style="font-family: 微Y雅黑;">~译h可以充分利用强大的CMake了:</span><br> <div style="margin-left: 40px;"> <pre>git clone git://gitorious.org/boost/cmake.git src<br>cd src<br>git checkout <TAG>    //TAG==1.41.0.cmake0<br>mkdir bld<br>cd bld/<br>cmake ../<br></pre> </div> <pre>如果需要按需~译某些库,只需用make edit_cache修改cache卛_?br></pre> <div style="margin-left: 40px;"> </div><img src ="http://www.shnenglu.com/skyscribe/aggbug/114919.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/skyscribe/" target="_blank">skyscribe</a> 2010-05-09 14:59 <a href="http://www.shnenglu.com/skyscribe/archive/2010/05/09/114919.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Curl&SSLhttp://www.shnenglu.com/skyscribe/archive/2009/07/27/90216.htmlskyscribeskyscribeMon, 27 Jul 2009 14:29:00 GMThttp://www.shnenglu.com/skyscribe/archive/2009/07/27/90216.htmlhttp://www.shnenglu.com/skyscribe/comments/90216.htmlhttp://www.shnenglu.com/skyscribe/archive/2009/07/27/90216.html#Feedback0http://www.shnenglu.com/skyscribe/comments/commentRss/90216.htmlhttp://www.shnenglu.com/skyscribe/services/trackbacks/90216.htmlҎ其源码里边的说明Q?
只需要在./configure 后边加上 --with-ssl=<path>卛_?br>
开始的时候,没留意这个,因ؓ_略扫描了一?--help, 后边q么说了Q?br>
  --with-libssh2=PATH     Where to look for libssh2, PATH points to the
                          LIBSSH2 installation (
default/usr/local/lib); when
                          possible, 
set the PKG_CONFIG_PATH environment
                          variable instead of 
using this option
我的目标库的就是在/usr/local/ssl下边了,当时~译之后Q链接v来L提示找不到对应版本的libssl.so.0.9.7.

后来才发?环境变量做幅调整、改动来探测)Q这个default在Solaris上边q不是真的default,必须昄指定?usr/local/ssl,否则扑ֈ的居然是/usr/sfw/?br>



skyscribe 2009-07-27 22:29 发表评论
]]>
CMake杂记http://www.shnenglu.com/skyscribe/archive/2009/07/04/89219.htmlskyscribeskyscribeSat, 04 Jul 2009 05:15:00 GMThttp://www.shnenglu.com/skyscribe/archive/2009/07/04/89219.htmlhttp://www.shnenglu.com/skyscribe/comments/89219.htmlhttp://www.shnenglu.com/skyscribe/archive/2009/07/04/89219.html#Feedback0http://www.shnenglu.com/skyscribe/comments/commentRss/89219.htmlhttp://www.shnenglu.com/skyscribe/services/trackbacks/89219.html
  • 1> 量使用外部build而不是内部build.
所谓的内外Q指的是make目录和CMakeLists.txt不在一个目录下?br>好处是,所有的临时文g都会生成在当前运行cmake/make的目录?br>譬如在项目根目录有一个CMakeLists.txt作ؓtop-level file, 几个代码子目录,一个build目录Q可以用Q?br>
cd build
cmake ..
make
此时中间文g不会污染目的目录结构?br>
  • 2> 可以用如下方式生成同名的静态库和动态库Q?/li>
set(libname "mylib")

add_library(libname_static STATIC src1 src2)
set_target_properties(libname_static OUTPUT_NAME ${libname})

add_library(libname SHARED src1 src2)
  • 3> 如何获取当前q行目录Qworking directoryQ?可以在根目录讄一个project_dir变量Q设|ؓ源代码目录,如下
set(project_top_dir ${CMAKE_CURRENT_SOURCE_DIR}/")

add_subdirectory(sub1)
add_subdirectory(sub2)
此时Q各个子目录中可以应用project_top_dir.
4> 处理跨^台的W三方库Q假讄三方库不是由CMake~译得来Q但要检依赖和变动Q则可以用imported属性:
add_library(ssllib SHARED IMPORTED)
add_library(cryptolib SHARED IMPORTED)
#May have different dependent libraries
set(libsuffix ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
set_target_properties(ssllib PROPERTIES IMPORTED_LOCATION 
"${project_top_dir}contrib/openssl/lib/libssl-${libsuffix}.so")
set_target_properties(cryptolib PROPERTIES IMPORTED_LOCATION 
"${project_top_dir}contrib/openssl/lib/libcrypto-${libsuffix}.so")


........................
#other CMakeLists.txt
add_executable(myExe src1 src2)
target_link_libraries(myExe ssllib cryptolib)


skyscribe 2009-07-04 13:15 发表评论
]]>
利用cmake来搭建开发环?/title><link>http://www.shnenglu.com/skyscribe/archive/2009/07/01/89026.html</link><dc:creator>skyscribe</dc:creator><author>skyscribe</author><pubDate>Wed, 01 Jul 2009 13:51:00 GMT</pubDate><guid>http://www.shnenglu.com/skyscribe/archive/2009/07/01/89026.html</guid><wfw:comment>http://www.shnenglu.com/skyscribe/comments/89026.html</wfw:comment><comments>http://www.shnenglu.com/skyscribe/archive/2009/07/01/89026.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/skyscribe/comments/commentRss/89026.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/skyscribe/services/trackbacks/89026.html</trackback:ping><description><![CDATA[对于l常在终端下写程序的non-windowsE序员,Makefilel对是最常用的工P到一个文件的单的试E序Q大到数百个文g的商业YӞ只需要有shellQ一个make命o可得到可运行的E序QMakefilel对功不可没Q可惜世界中不是那么太^Q不但各个Posixpȝ的API千差万别Q硬件^台各异,pMakefile本n也有多个不兼容的格式Q譬如GNU Makefile 拿到Solarisq_上就没法make下去Q除非你有gmakeQ但gmake对ƈ行编译的支持没有solaris自带的dmake要好了?br><br>GNU autotools提供了一个不错的选择Q可以做到组l工具链来生成所需的MakefileQ但~陷是学习v来比较麻烦,而且模版文g写v来比较费劌Ӏ老实说我跟Makefile打了q?q的交道Q几乎没有自己写qautomake脚本Q相反的工作倒是q了不少Q譬如分析生成的Makefileq行q程Q然后模拟自己手写MakefileQ得C个轻爽的定制环境?br><br>除了autotoolsQ其实也有不其他的工具Q譬如apache的antQ基于Python的sconsQant在java界是鼎鼎大名了,可惜对c++的支持确实让我感觉很不习惯;sconsL可以嵌入Python代码Q用h也算单,但是惛_现复杂的功能很头疼了,而且q行速度让h挠头?br><br>cmake则I补了上述几个工具的诸多缺P<br>1> 易于学习Q文易懂,只需牢记以下两个命o卛_Q?br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">cmake </span><span style="color: #000000;">--</span><span style="color: #000000;">help<br>cmake </span><span style="color: #000000;">--</span><span style="color: #000000;">help</span><span style="color: #000000;">-</span><span style="color: #000000;">command</span><span style="color: #000000;">-</span><span style="color: #000000;">list<br>cmake </span><span style="color: #000000;">--</span><span style="color: #000000;">help</span><span style="color: #000000;">-</span><span style="color: #000000;">command xxx<br>cmake </span><span style="color: #000000;">--</span><span style="color: #000000;">help</span><span style="color: #000000;">-</span><span style="color: #000000;">variable</span><span style="color: #000000;">-</span><span style="color: #000000;">list<br>cmake </span><span style="color: #000000;">--</span><span style="color: #000000;">help</span><span style="color: #000000;">-</span><span style="color: #000000;">variable yyy</span></div> 2> 以文本文件组l,利用cache的方式,所有的自定义cache变量可直接用vim查看?br>3> 生成的Makefile文gz易?br>4> ~译器选项可自己在ccmake中编辑,利于交叉~译<br>5> 支持集成ctest/cpack,前者可以方便的做单元测试,后者则可以打包生成tgz/rpm<br>6> 支持多个生成器,可以生成eclipse/codeblocks/gmake/unix make文gQ甚臛_以生成VC各个版本的dsw/sln.<br>7> 内嵌语言Q可以自己写函数、宏{?br><br>对于l常写小试E序的h来说Q在test目录下加上个CMakeLists.txtQ里边加上几行简单的语句可以方便的以后重复使用了。对于这U情况,手工写的Makefile到依赖这U麻烦的事情往往力不从心Qautomake又太题大作Q而cmake则恰到好处了?br><br>对于大型E序Qcmake可以自己定制生成的中间文件和目标文g路径Q有效避免了automake带来的每个目录下生成一大堆文g的弊端,也不需要手工写Makefile?br>最有用的是可以生成多个知名IDE的工E文Ӟ包括Windows下的vc6-vc9.<br><br><img src ="http://www.shnenglu.com/skyscribe/aggbug/89026.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/skyscribe/" target="_blank">skyscribe</a> 2009-07-01 21:51 <a href="http://www.shnenglu.com/skyscribe/archive/2009/07/01/89026.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Log4cpp:Z型C++目加上log支持http://www.shnenglu.com/skyscribe/archive/2009/06/18/88035.htmlskyscribeskyscribeThu, 18 Jun 2009 14:22:00 GMThttp://www.shnenglu.com/skyscribe/archive/2009/06/18/88035.htmlhttp://www.shnenglu.com/skyscribe/comments/88035.htmlhttp://www.shnenglu.com/skyscribe/archive/2009/06/18/88035.html#Feedback0http://www.shnenglu.com/skyscribe/comments/commentRss/88035.htmlhttp://www.shnenglu.com/skyscribe/services/trackbacks/88035.html
现实的情况却是很多项目都是从最初的数千行代码逐步庞大hQ开始的时候可能ؓ了图方便Q加log的方式大多是自己在iostream的基上自己封装一下;{到目扩大数十倍的时候,却发现这U方式很力不从心QLog文g凌ؕ复杂Q难以管理?br>
现有的log工具Q基本是分ؓ两个阵营Q经典的syslog和花哨强大的log4jQ从而衍生出很多个变体。log4j基本已经成ؓ复杂应用E序的log标准了,无奈C++的几个模仿者确各有千秋。我的情冉|Q?br>1>不需要复杂的配置Q甚至不需要配|文Ӟ但修改log消息格式又要很方?br>2>支持自动备䆾功能
3>多线E安?br>4>效率要尽量高
5>不要有其他依?br>
log4cpp很轻易的满了我的要求,只需要用已有的RollingFileAppender准备好后端,创徏PatternLayoutQ一切就可以了;logU别的设|完全和syslog协议一P很直观,打log地方Q调用默认的Category理器取得一个命名的Category,其他是单的调用? log(), debug(), notice(), info(), notice()....

本来最感兴的是log4cxx, Apache的伟大项目,功能也最全,ȝ的是它自带了两个q_库,需要额外依赖;配置文g也要昄准备Q感觉太臃肿了,估计大项目采用的吧?br>
效率上最高的应该是pantheiosle了,据说没开启Log的情况下Qoverhead几乎?Q作者自U效率是log4cxx的数倍,但也依赖于STLSoftQ虽然只有头文gQ?其打包方式也让h想避而远之,q要用作者自己写的版本选择器来选一个合适的库(Win的情况)?br>
q有一个是Boost的logging库,用尽了模板技巧,虽然很炫Q当时没多少用,也没有通过boost 严格的reviewQ虽然是专家写的Q暂时也没时间评估和学习了?br>


skyscribe 2009-06-18 22:22 发表评论
]]>
GCC4.4.0 & C++0x 初体?/title><link>http://www.shnenglu.com/skyscribe/archive/2009/05/16/83150.html</link><dc:creator>skyscribe</dc:creator><author>skyscribe</author><pubDate>Sat, 16 May 2009 14:24:00 GMT</pubDate><guid>http://www.shnenglu.com/skyscribe/archive/2009/05/16/83150.html</guid><wfw:comment>http://www.shnenglu.com/skyscribe/comments/83150.html</wfw:comment><comments>http://www.shnenglu.com/skyscribe/archive/2009/05/16/83150.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/skyscribe/comments/commentRss/83150.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/skyscribe/services/trackbacks/83150.html</trackback:ping><description><![CDATA[闲来无事Q翻看GNU的邮件列表,发现4.4.0版本已经发布一个月有余Q其中最大的改进莫过于c++了(也许是我对c++的部分最为关注的~故Q,<a >ChangeLog</a>里边甚至专门列了一?a >|页</a>描述针对C++0x的支持特性,忍不住体验一把?br><br>W一步要做的自然是手动编译GCC的源代码了,因ؓ我没有找到Debian版本的升U包Q干脆自׃载,我只需要gcc-core和g++两个包就可以了,一?5MQ一?MQ下载倒是挺顺利,几分钟就OK了,接下来就是编译了。常见的源码~译步骤OK了:<br>        <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: #eeeeee;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"><span style="color: #000000;">.</span><span style="color: #000000;">/</span><span style="color: #000000;">Configure<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">make<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">make install</span></div> <br>我遇到的是有两个关于多处理器的开发库依赖Qapt-get很容易就安装上去了?br><br>~译的过E就比较漫长了,我的Pentium D 2.8G Dual Corezȝ生忙zM一个小午休的时_h发现q没~译完,不过十分钟之后就发现所有的OK了?br><br>TR1的库Qboost的示例比较好Q其?a >W?1?/a>有详l的列表和用法简要说明。参照那个查了一下GCC的头文gQ在<br>   /usr/local/include/c++/4.4.0/tr1/ 里边Q?br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: #eeeeee;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"><span style="color: #000000;">ls </span><span style="color: #000000;">-</span><span style="color: #000000;">lh </span><span style="color: #000000;">|</span><span style="color: #000000;"> awk </span><span style="color: #000000;">'</span><span style="color: #000000;">$8 ~/^[a-z]+$/{print $8}</span><span style="color: #000000;">'</span><span style="color: #000000;"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">array<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">ccomplex<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">cctype<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">cfenv<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">cfloat<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">cinttypes<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">climits<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">cmath<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">complex<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">cstdarg<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">cstdbool<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">cstdint<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">cstdio<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">cstdlib<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">ctgmath<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">ctime<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">cwchar<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">cwctype<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">functional<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">memory<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">random<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">regex<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">tuple<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">utility</span></div> <br>我比较熟悉和期待的是bind, function, auto, shared_ptr, mem_fnq几个库了,写了个小例子验证之:<br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: #eeeeee;"><span style="color: #008080;"> 1</span><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"><span style="color: #008000;">//</span><span style="color: #008000;"> g++ -std=c++0x -o testC++0x testNewC++.cpp </span><span style="color: #008000;"><br></span><span style="color: #008080;"> 2</span><span style="color: #008000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"></span><span style="color: #000000;"><br></span><span style="color: #008080;"> 3</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">#include </span><span style="color: #000000;"><</span><span style="color: #000000;">tr1</span><span style="color: #000000;">/</span><span style="color: #000000;">memory</span><span style="color: #000000;">></span><span style="color: #000000;"><br></span><span style="color: #008080;"> 4</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">#include </span><span style="color: #000000;"><</span><span style="color: #000000;">tr1</span><span style="color: #000000;">/</span><span style="color: #000000;">functional</span><span style="color: #000000;">></span><span style="color: #000000;"><br></span><span style="color: #008080;"> 5</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">#include </span><span style="color: #000000;"><</span><span style="color: #000000;">tr1</span><span style="color: #000000;">/</span><span style="color: #000000;">tuple</span><span style="color: #000000;">></span><span style="color: #000000;"><br></span><span style="color: #008080;"> 6</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">#include </span><span style="color: #000000;"><</span><span style="color: #000000;">vector</span><span style="color: #000000;">></span><span style="color: #000000;"><br></span><span style="color: #008080;"> 7</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">#include </span><span style="color: #000000;"><</span><span style="color: #000000;">iostream</span><span style="color: #000000;">></span><span style="color: #000000;"><br></span><span style="color: #008080;"> 8</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"><br></span><span style="color: #008080;"> 9</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"></span><span style="color: #0000ff;">using</span><span style="color: #000000;"> </span><span style="color: #0000ff;">namespace</span><span style="color: #000000;"> std;<br></span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"><br></span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"></span><span style="color: #0000ff;">void</span><span style="color: #000000;"> func1(</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> j, tr1::tuple</span><span style="color: #000000;"><</span><span style="color: #0000ff;">int</span><span style="color: #000000;">, </span><span style="color: #0000ff;">int</span><span style="color: #000000;">, </span><span style="color: #0000ff;">int</span><span style="color: #000000;">></span><span style="color: #000000;"> k)<br></span><span style="color: #008080;">12</span><span style="color: #000000;"><img id="Codehighlighter1_232_389_Open_Image" onclick="this.style.display='none'; codehighlighter1_232_389_open_text.style.display="'none';" codehighlighter1_232_389_closed_image.style.display="'inline';" codehighlighter1_232_389_closed_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_232_389_Closed_Image" style="display: none;" onclick="this.style.display='none'; codehighlighter1_232_389_closed_text.style.display="'none';" codehighlighter1_232_389_open_image.style.display="'inline';" codehighlighter1_232_389_open_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_232_389_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id="Codehighlighter1_232_389_Open_Text"><span style="color: #000000;">{<br></span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    cout </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">func1:</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> i </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">, </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> j </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">, </span><span style="color: #000000;">"</span><span style="color: #000000;"><br></span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">         </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">, tuple param:[</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #0000ff;">get</span><span style="color: #000000;"><</span><span style="color: #000000;">0</span><span style="color: #000000;">></span><span style="color: #000000;">(k) </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">,</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #0000ff;">get</span><span style="color: #000000;"><</span><span style="color: #000000;">1</span><span style="color: #000000;">></span><span style="color: #000000;">(k)<br></span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">         </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">,</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #0000ff;">get</span><span style="color: #000000;"><</span><span style="color: #000000;">2</span><span style="color: #000000;">></span><span style="color: #000000;">(k) </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">]</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> endl;<br></span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top">}</span></span><span style="color: #000000;"><br></span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"><br></span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"><br></span><span style="color: #008080;">19</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"></span><span style="color: #0000ff;">void</span><span style="color: #000000;"> func2(</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> j)<br></span><span style="color: #008080;">20</span><span style="color: #000000;"><img id="Codehighlighter1_418_469_Open_Image" onclick="this.style.display='none'; codehighlighter1_418_469_open_text.style.display="'none';" codehighlighter1_418_469_closed_image.style.display="'inline';" codehighlighter1_418_469_closed_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_418_469_Closed_Image" style="display: none;" onclick="this.style.display='none'; codehighlighter1_418_469_closed_text.style.display="'none';" codehighlighter1_418_469_open_image.style.display="'inline';" codehighlighter1_418_469_open_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_418_469_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id="Codehighlighter1_418_469_Open_Text"><span style="color: #000000;">{<br></span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    cout </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">func2: </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> i </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">, </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> j </span><span style="color: #000000;"><<</span><span style="color: #000000;"> endl;<br></span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top">}</span></span><span style="color: #000000;">    <br></span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"><br></span><span style="color: #008080;">24</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"></span><span style="color: #0000ff;">void</span><span style="color: #000000;"> func3(</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> k)<br></span><span style="color: #008080;">25</span><span style="color: #000000;"><img id="Codehighlighter1_494_532_Open_Image" onclick="this.style.display='none'; codehighlighter1_494_532_open_text.style.display="'none';" codehighlighter1_494_532_closed_image.style.display="'inline';" codehighlighter1_494_532_closed_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_494_532_Closed_Image" style="display: none;" onclick="this.style.display='none'; codehighlighter1_494_532_closed_text.style.display="'none';" codehighlighter1_494_532_open_image.style.display="'inline';" codehighlighter1_494_532_open_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_494_532_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id="Codehighlighter1_494_532_Open_Text"><span style="color: #000000;">{<br></span><span style="color: #008080;">26</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    cout </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">func3: </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> k </span><span style="color: #000000;"><<</span><span style="color: #000000;"> endl;<br></span><span style="color: #008080;">27</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top">}</span></span><span style="color: #000000;"><br></span><span style="color: #008080;">28</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"><br></span><span style="color: #008080;">29</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"></span><span style="color: #0000ff;">struct</span><span style="color: #000000;"> MyFunc1<br></span><span style="color: #008080;">30</span><span style="color: #000000;"><img id="Codehighlighter1_550_787_Open_Image" onclick="this.style.display='none'; codehighlighter1_550_787_open_text.style.display="'none';" codehighlighter1_550_787_closed_image.style.display="'inline';" codehighlighter1_550_787_closed_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_550_787_Closed_Image" style="display: none;" onclick="this.style.display='none'; codehighlighter1_550_787_closed_text.style.display="'none';" codehighlighter1_550_787_open_image.style.display="'inline';" codehighlighter1_550_787_open_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_550_787_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id="Codehighlighter1_550_787_Open_Text"><span style="color: #000000;">{<br></span><span style="color: #008080;">31</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    </span><span style="color: #0000ff;">void</span><span style="color: #000000;"> memFun1(</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> j)<br></span><span style="color: #008080;">32</span><span style="color: #000000;"><img id="Codehighlighter1_587_657_Open_Image" onclick="this.style.display='none'; codehighlighter1_587_657_open_text.style.display="'none';" codehighlighter1_587_657_closed_image.style.display="'inline';" codehighlighter1_587_657_closed_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_587_657_Closed_Image" style="display: none;" onclick="this.style.display='none'; codehighlighter1_587_657_closed_text.style.display="'none';" codehighlighter1_587_657_open_image.style.display="'inline';" codehighlighter1_587_657_open_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_587_657_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id="Codehighlighter1_587_657_Open_Text"><span style="color: #000000;">{<br></span><span style="color: #008080;">33</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">        cout </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">MyFunc1::memFun1 :</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> i </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">, </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> j </span><span style="color: #000000;"><<</span><span style="color: #000000;"> endl;<br></span><span style="color: #008080;">34</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top">    }</span></span><span style="color: #000000;"><br></span><span style="color: #008080;">35</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top"><br></span><span style="color: #008080;">36</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    </span><span style="color: #0000ff;">void</span><span style="color: #000000;"> memFun2(</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> j, </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> k)<br></span><span style="color: #008080;">37</span><span style="color: #000000;"><img id="Codehighlighter1_702_785_Open_Image" onclick="this.style.display='none'; codehighlighter1_702_785_open_text.style.display="'none';" codehighlighter1_702_785_closed_image.style.display="'inline';" codehighlighter1_702_785_closed_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_702_785_Closed_Image" style="display: none;" onclick="this.style.display='none'; codehighlighter1_702_785_closed_text.style.display="'none';" codehighlighter1_702_785_open_image.style.display="'inline';" codehighlighter1_702_785_open_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_702_785_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id="Codehighlighter1_702_785_Open_Text"><span style="color: #000000;">{<br></span><span style="color: #008080;">38</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">        cout </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">MyFunc1::memFun2 :</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> i </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">, </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> j </span><span style="color: #000000;"><<</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">, </span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;"><<</span><span style="color: #000000;"> k </span><span style="color: #000000;"><<</span><span style="color: #000000;"> endl;<br></span><span style="color: #008080;">39</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top">    }</span></span><span style="color: #000000;"><br></span><span style="color: #008080;">40</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top">}</span></span><span style="color: #000000;">;<br></span><span style="color: #008080;">41</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"><br></span><span style="color: #008080;">42</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"></span><span style="color: #0000ff;">int</span><span style="color: #000000;"> main()<br></span><span style="color: #008080;">43</span><span style="color: #000000;"><img id="Codehighlighter1_802_1539_Open_Image" onclick="this.style.display='none'; codehighlighter1_802_1539_open_text.style.display="'none';" codehighlighter1_802_1539_closed_image.style.display="'inline';" codehighlighter1_802_1539_closed_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_802_1539_Closed_Image" style="display: none;" onclick="this.style.display='none'; codehighlighter1_802_1539_closed_text.style.display="'none';" codehighlighter1_802_1539_open_image.style.display="'inline';" codehighlighter1_802_1539_open_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_802_1539_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id="Codehighlighter1_802_1539_Open_Text"><span style="color: #000000;">{<br></span><span style="color: #008080;">44</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    <br></span><span style="color: #008080;">45</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    typedef tr1::function</span><span style="color: #000000;"><</span><span style="color: #0000ff;">void</span><span style="color: #000000;"> (</span><span style="color: #0000ff;">int</span><span style="color: #000000;">)</span><span style="color: #000000;">></span><span style="color: #000000;"> Func;<br></span><span style="color: #008080;">46</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    </span><span style="color: #0000ff;">using</span><span style="color: #000000;"> std::tr1::bind;<br></span><span style="color: #008080;">47</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    </span><span style="color: #0000ff;">using</span><span style="color: #000000;"> std::tr1::mem_fn;<br></span><span style="color: #008080;">48</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    </span><span style="color: #0000ff;">using</span><span style="color: #000000;"> std::tr1::placeholders::_1;<br></span><span style="color: #008080;">49</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    </span><span style="color: #0000ff;">using</span><span style="color: #000000;"> std::tr1::shared_ptr;<br></span><span style="color: #008080;">50</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top"><br></span><span style="color: #008080;">51</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    shared_ptr</span><span style="color: #000000;"><</span><span style="color: #000000;">MyFunc1</span><span style="color: #000000;">></span><span style="color: #000000;"> instPtr(</span><span style="color: #0000ff;">new</span><span style="color: #000000;"> MyFunc1);<br></span><span style="color: #008080;">52</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    MyFunc1 functor;<br></span><span style="color: #008080;">53</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top"><br></span><span style="color: #008080;">54</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    vector</span><span style="color: #000000;"><</span><span style="color: #000000;">Func</span><span style="color: #000000;">></span><span style="color: #000000;"> funcs;<br></span><span style="color: #008080;">55</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    funcs.push_back(bind(</span><span style="color: #000000;">&</span><span style="color: #000000;">func1, _1, </span><span style="color: #000000;">2</span><span style="color: #000000;">, tr1::make_tuple(</span><span style="color: #000000;">3</span><span style="color: #000000;">,  </span><span style="color: #000000;">4</span><span style="color: #000000;">, </span><span style="color: #000000;">5</span><span style="color: #000000;">)));<br></span><span style="color: #008080;">56</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    funcs.push_back(bind(</span><span style="color: #000000;">&</span><span style="color: #000000;">func2, </span><span style="color: #000000;">1</span><span style="color: #000000;">, _1));<br></span><span style="color: #008080;">57</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    funcs.push_back(</span><span style="color: #000000;">&</span><span style="color: #000000;">func3);<br></span><span style="color: #008080;">58</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    funcs.push_back(bind(</span><span style="color: #000000;">&</span><span style="color: #000000;">MyFunc1::memFun1, </span><span style="color: #000000;">&</span><span style="color: #000000;">functor, _1, </span><span style="color: #000000;">21</span><span style="color: #000000;">));<br></span><span style="color: #008080;">59</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    funcs.push_back(bind(mem_fn(</span><span style="color: #000000;">&</span><span style="color: #000000;">MyFunc1::memFun2), </span><span style="color: #000000;">&</span><span style="color: #000000;">functor, </span><span style="color: #000000;">1</span><span style="color: #000000;">, </span><span style="color: #000000;">2</span><span style="color: #000000;">, _1));<br></span><span style="color: #008080;">60</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    funcs.push_back(bind(</span><span style="color: #000000;">&</span><span style="color: #000000;">MyFunc1::memFun1, instPtr, _1, </span><span style="color: #000000;">22</span><span style="color: #000000;">));<br></span><span style="color: #008080;">61</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top"><br></span><span style="color: #008080;">62</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    </span><span style="color: #0000ff;">for</span><span style="color: #000000;"> (auto it </span><span style="color: #000000;">=</span><span style="color: #000000;"> funcs.begin(), itEnd </span><span style="color: #000000;">=</span><span style="color: #000000;"> funcs.end();<br></span><span style="color: #008080;">63</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">        it </span><span style="color: #000000;">!=</span><span style="color: #000000;"> itEnd; </span><span style="color: #000000;">++</span><span style="color: #000000;">it)<br></span><span style="color: #008080;">64</span><span style="color: #000000;"><img id="Codehighlighter1_1498_1522_Open_Image" onclick="this.style.display='none'; codehighlighter1_1498_1522_open_text.style.display="'none';" codehighlighter1_1498_1522_closed_image.style.display="'inline';" codehighlighter1_1498_1522_closed_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_1498_1522_Closed_Image" style="display: none;" onclick="this.style.display='none'; codehighlighter1_1498_1522_closed_text.style.display="'none';" codehighlighter1_1498_1522_open_image.style.display="'inline';" codehighlighter1_1498_1522_open_text.style.display="'inline';"" src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_1498_1522_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;"><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id="Codehighlighter1_1498_1522_Open_Text"><span style="color: #000000;">{<br></span><span style="color: #008080;">65</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">        (</span><span style="color: #000000;">*</span><span style="color: #000000;">it)(</span><span style="color: #000000;">0</span><span style="color: #000000;">);<br></span><span style="color: #008080;">66</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top">    }</span></span><span style="color: #000000;"><br></span><span style="color: #008080;">67</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top"><br></span><span style="color: #008080;">68</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif" align="top">    </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br></span><span style="color: #008080;">69</span><span style="color: #000000;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" align="top">}</span></span></div> <br>~译之后Q运行结果如下:<br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; font-size: 13px; width: 98%; background-color: #eeeeee;"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top"><span style="color: #000000;">func1:</span><span style="color: #000000;">0</span><span style="color: #000000;">, </span><span style="color: #000000;">2</span><span style="color: #000000;">, , tuple param:[</span><span style="color: #000000;">3</span><span style="color: #000000;">,</span><span style="color: #000000;">4</span><span style="color: #000000;">,</span><span style="color: #000000;">5</span><span style="color: #000000;">]<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">func2: </span><span style="color: #000000;">1</span><span style="color: #000000;">, </span><span style="color: #000000;">0</span><span style="color: #000000;"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">func3: </span><span style="color: #000000;">0</span><span style="color: #000000;"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">MyFunc1::memFun1 :</span><span style="color: #000000;">0</span><span style="color: #000000;">, </span><span style="color: #000000;">21</span><span style="color: #000000;"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">MyFunc1::memFun2 :</span><span style="color: #000000;">1</span><span style="color: #000000;">, </span><span style="color: #000000;">2</span><span style="color: #000000;">, </span><span style="color: #000000;">0</span><span style="color: #000000;"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align="top">MyFunc1::memFun1 :</span><span style="color: #000000;">0</span><span style="color: #000000;">, </span><span style="color: #000000;">22</span></div> ׃我的环境下,新版的litstdc++.so被安装在?usr/local/lib64/下边Q所以需要手工指定动态库的\径(export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH卛_l过/usr/lib/libstdc++.soQ?<br><br>估计q么奇妙的特性,q入工业应用q得不少旉吧,ȝ的标准化...<br><br><img src ="http://www.shnenglu.com/skyscribe/aggbug/83150.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/skyscribe/" target="_blank">skyscribe</a> 2009-05-16 22:24 <a href="http://www.shnenglu.com/skyscribe/archive/2009/05/16/83150.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.s9990.cn" target="_blank">þþþAVվ</a>| <a href="http://www.yunkouzi.cn" target="_blank">˾þۺij</a>| <a href="http://www.173xp.cn" target="_blank">þùƷӰԺ</a>| <a href="http://www.sangaotang.cn" target="_blank">ɫ͵͵͵þ˴ý</a>| <a href="http://www.yangrendong.com.cn" target="_blank">þ͵wcŮ</a>| <a href="http://www.toy365.cn" target="_blank">þ99Ʒ99þ</a>| <a href="http://www.hzmgdj.com.cn" target="_blank">þþƷ޸</a>| <a href="http://www.hantong168.com.cn" target="_blank">99ƷþþƷһ</a>| <a href="http://www.linglonggegame.cn" target="_blank">Ʒþþþþ </a>| <a href="http://www.facpw.cn" target="_blank">þҹҹݺ2022</a>| <a href="http://www.daliandamingda.cn" target="_blank">޾þһ </a>| <a href="http://www.07sn.cn" target="_blank">þþþþþAv</a>| <a href="http://www.78cbg.cn" target="_blank">ƷŮþþ</a>| <a href="http://www.dnf-video.cn" target="_blank">ݺɫþþһ</a>| <a href="http://www.eobt.cn" target="_blank">鶹wwwþ</a>| <a href="http://www.anfubbs.cn" target="_blank">ľþþƷww16 </a>| <a href="http://www.1dis.cn" target="_blank">þþƷ99Ʒ</a>| <a href="http://www.jumingyang.cn" target="_blank">þþƷһ</a>| <a href="http://www.f4home.cn" target="_blank">ղƷþþþþþ</a>| <a href="http://www.ttpcom.com.cn" target="_blank">91ƷۺϾþ㽶</a>| <a href="http://www.gjznet.cn" target="_blank">ٸþĻ</a>| <a href="http://www.blog060422.cn" target="_blank">˾Ʒһþþ</a>| <a href="http://www.mrzqjn.cn" target="_blank">þþþþþ97</a>| <a href="http://www.bjsdmngs.cn" target="_blank">޹ƷþSM</a>| <a href="http://www.xzij.cn" target="_blank">˾þô߽AVһ </a>| <a href="http://www.yc9z.com.cn" target="_blank">þþþþ</a>| <a href="http://www.tbssyc.cn" target="_blank">ھƷۺϾþþ40p</a>| <a href="http://www.lzjrdfl.cn" target="_blank">þþƷר</a>| <a href="http://www.yuleluntan.cn" target="_blank">99þwww˳ɾƷ</a>| <a href="http://www.3344pltn.cn" target="_blank">Vþþ</a>| <a href="http://www.wjjj8.cn" target="_blank">ɫۺϾþ</a>| <a href="http://www.cqmh.com.cn" target="_blank">ҹƷþþþþ</a>| <a href="http://www.pjov.cn" target="_blank">޹˾Ʒþþþþۺ</a>| <a href="http://www.cn1s.cn" target="_blank">þùһ</a>| <a href="http://www.py63.cn" target="_blank">ݺɫþþۺ</a>| <a href="http://www.xldgdq.cn" target="_blank">Ʒþþþþþ</a>| <a href="http://www.ljvs.cn" target="_blank">þþƷۺɫ</a>| <a href="http://www.k8movie.cn" target="_blank">þþ91Ʒһ </a>| <a href="http://www.mianfei100.cn" target="_blank">þþþAV</a>| <a href="http://www.jn928.cn" target="_blank">ھƷþþþþþþ</a>| <a href="http://www.everspringgroup.cn" target="_blank">91Ʒպþò</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>