锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久er99热精品一区二区,久久九九久精品国产免费直播,秋霞久久国产精品电影院http://www.shnenglu.com/skyscribe/category/10931.htmlzh-cnSun, 09 May 2010 17:01:23 GMTSun, 09 May 2010 17:01:23 GMT60GCC4.5鐨刾rofile 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.html榪欓噷錛夛紝
榪樺鍔犱簡涓涓柊鐨刾rofile妯″紡錛堝皻澶勪簬璇曢獙闃舵錛夛紝鍙互鏍規嵁紼嬪簭榪愯鐘舵佺粰鍑哄叧浜嶴TL浣跨敤鐨勪竴浜涗紭鍖栧緩璁?br>
鍙傜湅濡備笅鐨勬弿榪幫細
  • 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.

榪欎釜profile mode鐨勪富瑕佷綔鐢ㄥ氨鏄牴鎹唬鐮佸疄闄呰繍琛岀姸鍐電粰鍑哄叧浜嶴TL鐨勪嬌鐢ㄤ紭鍖栧緩璁傛湁鐐歸仐鎲劇殑鏄紝璇rofile鏂規硶鏄痠ntrusive鐨勶紝蹇呴』娣誨姞-D_GLBCXX_PROFILE鏉ラ噸鏂扮紪璇戞墍鏈夌殑浠g爜銆?br>
Profile mode鐨勬彁鍑烘簮浜?9騫碈GO鐨勪竴綃?a >paper錛屼綔鑰呴噷杈瑰嚭鐜頒簡鍗庝漢鐨勫悕瀛楋紙鏍規嵁鎷奸煶鏉ュ垽鏂級;浣滆呭湴鍧濉殑鏄劇劧鏄疨urdue澶у鐨勶細
    Dept. of Comput. Sci., Purdue Univ., West銆?br>
GCC鐨凱rofiler瀵笴++鐨勬敮鎸佷竴璐仠鐣欏湪鍜孋鍚屾牱鐨勬按騫籌紱鐢變簬C++妯℃澘鏈哄埗鍜孫O鐨勫瓨鍦ㄤ嬌寰楀緢澶氭椂鍊欏垎鏋恜rofiling緇撴灉鐨勬剰涔夎澶уぇ鍓婂急銆?br>榪欎釜閽堝STL鐨刾rofile mode榪樻槸寰堝煎緱鏈熷緟鐨勩?br>



skyscribe 2010-05-09 15:16 鍙戣〃璇勮
]]>
boost.cmake: 鏂逛究瑙e喅boost鐨勫崌綰ч棶棰?/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鐨勪竴浜涘簱錛岀敱浜庨」鐩嚜韜敤cmake緇勭粐build銆?br>boost姣忔鍗囩駭涔嬪悗錛岄噸鏂扮敤bjam緙栬瘧涓嬈¢兘寰堟槸涓嶄究錛堟煇浜涘鉤鍙幫紝鐢ㄩ粯璁ら夐」緙栬瘧鏈変簺闂錛屽熀鏈畨瑁呬笉鎴愬姛錛夈?br><br>鏈榪戞墠鍙戠幇boost鐨刢make鐗堟湰宸茬粡鐙珛鍑烘潵浜嗭紝瀵逛簬浣跨敤cmake鐨勭敤鎴瘋岃█錛岃繖閲屾槸涓笉閿欑殑閫夋嫨銆?br>欏圭洰<a >涓婚〉</a>鐨勬枃妗e緢鏄竻鏅幫紝鏈鏂扮殑鐗堟湰鏄?.41 (鐗堟湰鍙峰搴旂殑鍩烘湰灝辨槸鍏秛pstream鐨刡oost鐗堟湰鍙?銆?br>婧愪唬鐮佹槸鐢╣it緇勭粐鐨勶紝瀵逛簬Linux鐢ㄦ埛鑰岃█鏇村姞鏂逛究銆?br><br>寮曠敤鍏朵富欏典笂鐨勪竴鍙ヨ瘽錛?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: 寰蔣闆呴粦;">緙栬瘧璧鋒潵鍙互鍏呭垎鍒╃敤寮哄ぇ鐨凜Make浜嗭細</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>濡傛灉闇瑕佹寜闇緙栬瘧鏌愪簺搴擄紝鍙渶鐢╩ake 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鏍規嵁鍏舵簮鐮侀噷杈圭殑璇存槑錛?
鍙渶瑕佸湪./configure 鍚庤竟鍔犱笂 --with-ssl=<path>鍗沖彲銆?br>
寮濮嬬殑鏃跺欙紝娌$暀鎰忚繖涓紝鍥犱負綺楃暐鎵弿浜嗕竴涓?--help, 鍚庤竟榪欎箞璇翠簡錛?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涓嬭竟浜嗭紝褰撴椂緙栬瘧涔嬪悗錛岄摼鎺ヨ搗鏉ユ繪槸鎻愮ず鎵句笉鍒板搴旂増鏈殑libssl.so.0.9.7.

鍚庢潵鎵嶅彂鐜?灝嗙幆澧冨彉閲忓仛灝忓箙璋冩暣銆佹敼鍔ㄦ潵鎺㈡祴)錛岃繖涓猟efault鍦⊿olaris涓婅竟騫朵笉鏄湡鐨刣efault,蹇呴』鏄劇ず鎸囧畾涓?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鑰屼笉鏄唴閮╞uild.
鎵璋撶殑鍐呭錛屾寚鐨勬槸make鐩綍鍜孋MakeLists.txt涓嶅湪涓涓洰褰曚笅銆?br>濂藉鏄紝鎵鏈夌殑涓存椂鏂囦歡閮戒細鐢熸垚鍦ㄥ綋鍓嶈繍琛宑make/make鐨勭洰褰曘?br>璀鍦ㄩ」鐩牴鐩綍鏈変竴涓狢MakeLists.txt浣滀負top-level file, 鍑犱釜浠g爜瀛愮洰褰曪紝涓涓猙uild鐩綍錛屽彲浠ョ敤錛?br>
cd build
cmake ..
make
姝ゆ椂涓棿鏂囦歡涓嶄細姹℃煋欏圭洰鐨勭洰褰曠粨鏋勩?br>
  • 2> 鍙互鐢ㄥ涓嬫柟寮忕敓鎴愬悓鍚嶇殑闈欐佸簱鍜屽姩鎬佸簱錛?/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> 濡備綍鑾峰彇褰撳墠榪愯鐩綍錛坵orking directory錛?鍙互鍦ㄦ牴鐩綍璁劇疆涓涓猵roject_dir鍙橀噺錛岃緗負婧愪唬鐮佺洰褰曪紝濡備笅
set(project_top_dir ${CMAKE_CURRENT_SOURCE_DIR}/")

add_subdirectory(sub1)
add_subdirectory(sub2)
姝ゆ椂錛屽悇涓瓙鐩綍涓彲浠ュ簲鐢╬roject_top_dir.
4> 澶勭悊璺ㄥ鉤鍙扮殑絎笁鏂瑰簱錛氬亣璁劇涓夋柟搴撲笉鏄敱CMake緙栬瘧寰楁潵錛屼絾瑕佹嫻嬩緷璧栧拰鍙樺姩錛屽垯鍙互鐢╥mported灞炴э細
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[瀵逛簬緇忓父鍦ㄧ粓绔笅鍐欑▼搴忕殑non-windows紼嬪簭鍛橈紝Makefile緇濆鏄渶甯哥敤鐨勫伐鍏鳳紝灝忓埌涓涓枃浠剁殑綆鍗曠殑嫻嬭瘯紼嬪簭錛屽ぇ鍒版暟鐧句釜鏂囦歡鐨勫晢涓氳蔣浠訛紝鍙渶瑕佹湁shell錛屼竴涓猰ake鍛戒護灝卞彲寰楀埌鍙繍琛岀殑紼嬪簭錛孧akefile緇濆鍔熶笉鍙病錛涘彲鎯滀笘鐣屼腑涓嶆槸閭d箞澶鉤錛屼笉浣嗗悇涓狿osix緋葷粺鐨凙PI鍗冨樊涓囧埆錛岀‖浠跺鉤鍙板悇寮傦紝灝辮繛Makefile鏈韓涔熸湁澶氫釜涓嶅吋瀹圭殑鏍煎紡錛岃濡侴NU Makefile 鎷垮埌Solaris騫沖彴涓婂氨娌℃硶make涓嬪幓錛岄櫎闈炰綘鏈塯make錛屼絾gmake瀵瑰茍琛岀紪璇戠殑鏀寔灝辨病鏈塻olaris鑷甫鐨刣make瑕佸ソ浜嗐?br><br>GNU autotools鎻愪緵浜嗕竴涓笉閿欑殑閫夋嫨錛屽彲浠ュ仛鍒扮粍緇囧伐鍏烽摼鏉ョ敓鎴愭墍闇鐨凪akefile錛屼絾緙洪櫡鏄涔犺搗鏉ユ瘮杈冮夯鐑︼紝鑰屼笖妯$増鏂囦歡鍐欒搗鏉ユ瘮杈冭垂鍔層傝佸疄璇存垜璺烳akefile鎵撲簡榪?騫寸殑浜ら亾錛屽嚑涔庢病鏈夎嚜宸卞啓榪嘺utomake鑴氭湰錛岀浉鍙嶇殑宸ヤ綔鍊掓槸騫蹭簡涓嶅皯錛岃濡傚垎鏋愮敓鎴愮殑Makefile榪愯榪囩▼錛岀劧鍚庢ā鎷熻嚜宸辨墜鍐橫akefile錛涘緱鍒頒竴涓交鐖界殑瀹氬埗鐜銆?br><br>闄や簡autotools錛屽叾瀹炰篃鏈変笉灝戝叾浠栫殑宸ュ叿錛岃濡俛pache鐨刟nt錛屽熀浜嶱ython鐨剆cons錛沘nt鍦╦ava鐣屾槸榧庨紟澶у悕浜嗭紝鍙儨瀵筩++鐨勬敮鎸佺‘瀹炶鎴戞劅瑙夊緢涓嶄範鎯紱scons鍙風О鍙互宓屽叆Python浠g爜錛岀敤璧鋒潵涔熺畻綆鍗曪紝浣嗘槸鎯沖疄鐜板鏉傜殑鍔熻兘灝卞緢澶寸柤浜嗭紝鑰屼笖榪愯閫熷害璁╀漢鎸犲ご銆?br><br>cmake鍒欏譏琛ヤ簡涓婅堪鍑犱釜宸ュ叿鐨勮澶氱己闄鳳細<br>1> 鏄撲簬瀛︿範錛屾枃妗f槗鎳傦紝鍙渶鐗㈣浠ヤ笅涓や釜鍛戒護鍗沖彲錛?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> 浠ユ枃鏈枃浠剁粍緇囷紝鍒╃敤cache鐨勬柟寮忥紝鎵鏈夌殑鑷畾涔塩ache鍙橀噺鍙洿鎺ョ敤vim鏌ョ湅銆?br>3> 鐢熸垚鐨凪akefile鏂囦歡綆媧佹槗鎳?br>4> 緙栬瘧鍣ㄩ夐」鍙嚜宸卞湪ccmake涓紪杈戯紝鍒╀簬浜ゅ弶緙栬瘧<br>5> 鏀寔闆嗘垚ctest/cpack,鍓嶈呭彲浠ユ柟渚跨殑鍋氬崟鍏冩祴璇曪紝鍚庤呭垯鍙互鎵撳寘鐢熸垚tgz/rpm<br>6> 鏀寔澶氫釜鐢熸垚鍣紝鍙互鐢熸垚eclipse/codeblocks/gmake/unix make鏂囦歡錛岀敋鑷沖彲浠ョ敓鎴怴C鍚勪釜鐗堟湰鐨刣sw/sln.<br>7> 鍐呭祵璇█錛屽彲浠ヨ嚜宸卞啓鍑芥暟銆佸畯絳?br><br>瀵逛簬緇忓父鍐欏皬嫻嬭瘯紼嬪簭鐨勪漢鏉ヨ錛屽湪test鐩綍涓嬪姞涓婁釜CMakeLists.txt錛岄噷杈瑰姞涓婂嚑琛岀畝鍗曠殑璇彞灝卞彲浠ユ柟渚跨殑浠ュ悗閲嶅浣跨敤浜嗐傚浜庤繖縐嶆儏鍐碉紝鎵嬪伐鍐欑殑Makefile紕板埌渚濊禆媯嫻嬭繖縐嶉夯鐑︾殑浜嬫儏寰寰鍔涗笉浠庡績錛宎utomake鍙堝お灝忛澶т綔錛岃宑make鍒欐伆鍒板ソ澶勪簡銆?br><br>瀵逛簬澶у瀷紼嬪簭錛宑make鍙互鑷繁瀹氬埗鐢熸垚鐨勪腑闂存枃浠跺拰鐩爣鏂囦歡璺緞錛屾湁鏁堥伩鍏嶄簡automake甯︽潵鐨勬瘡涓洰褰曚笅鐢熸垚涓澶у爢鏂囦歡鐨勫紛绔紝涔熶笉闇瑕佹墜宸ュ啓Makefile銆?br>鏈鏈夌敤鐨勬槸鍙互鐢熸垚澶氫釜鐭ュ悕IDE鐨勫伐紼嬫枃浠訛紝鍖呮嫭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:涓轟腑灝忓瀷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
鐜板疄鐨勬儏鍐靛嵈鏄緢澶氶」鐩兘鏄粠鏈鍒濈殑鏁板崈琛屼唬鐮侀愭搴炲ぇ璧鋒潵錛涘紑濮嬬殑鏃跺欏彲鑳戒負浜嗗浘鏂逛究錛屽姞log鐨勬柟寮忓ぇ澶氭槸鑷繁鍦╥ostream鐨勫熀紜涓婅嚜宸卞皝瑁呬竴涓嬶紱絳夊埌欏圭洰鎵╁ぇ鏁板崄鍊嶇殑鏃跺欙紝鍗村彂鐜拌繖縐嶆柟寮忓緢鍔涗笉浠庡績錛孡og鏂囦歡鍑屼貢澶嶆潅錛岄毦浠ョ鐞嗐?br>
鐜版湁鐨刲og宸ュ叿錛屽熀鏈槸鍒嗕負涓や釜闃佃惀錛岀粡鍏哥殑syslog鍜岃姳鍝ㄥ己澶х殑log4j錛屼粠鑰岃鐢熷嚭寰堝涓彉浣撱俵og4j鍩烘湰宸茬粡鎴愪負澶嶆潅搴旂敤紼嬪簭鐨刲og鏍囧噯浜嗭紝鏃犲C++鐨勫嚑涓ā浠胯呯‘鍚勬湁鍗冪銆傛垜鐨勬儏鍐墊槸錛?br>1>涓嶉渶瑕佸鏉傜殑閰嶇疆錛岀敋鑷充笉闇瑕侀厤緗枃浠訛紝浣嗕慨鏀筶og娑堟伅鏍煎紡鍙堣寰堟柟渚?br>2>鏀寔鑷姩澶囦喚鍔熻兘
3>澶氱嚎紼嬪畨鍏?br>4>鏁堢巼瑕佸敖閲忛珮
5>涓嶈鏈夊叾浠栦緷璧?br>
log4cpp寰堣交鏄撶殑婊¤凍浜嗘垜鐨勮姹傦紝鍙渶瑕佺敤宸叉湁鐨凴ollingFileAppender鍑嗗濂藉悗绔紝鍒涘緩PatternLayout錛屼竴鍒囧氨鍙互浜嗭紱log綰у埆鐨勮緗畬鍏ㄥ拰syslog鍗忚涓鏍鳳紝寰堢洿瑙傦紝鎵搇og鍦版柟錛岃皟鐢ㄩ粯璁ょ殑Category綆$悊鍣ㄥ彇寰椾竴涓懡鍚嶇殑Category,鍏朵粬灝辨槸綆鍗曠殑璋冪敤浜? log(), debug(), notice(), info(), notice()....

鏈潵鏈鎰熷叴瓚g殑鏄痩og4cxx, Apache鐨勪紵澶ч」鐩紝鍔熻兘涔熸渶鍏紝楹葷儲鐨勬槸瀹冭嚜甯︿簡涓や釜騫沖彴搴擄紝闇瑕侀澶栦緷璧栵紱閰嶇疆鏂囦歡涔熻鏄劇ず鍑嗗錛屾劅瑙夊お鑷冭偪浜嗭紝浼拌澶ч」鐩噰鐢ㄧ殑鍚с?br>
鏁堢巼涓婃渶楂樼殑搴旇鏄痯antheiosle浜嗭紝鎹娌″紑鍚疞og鐨勬儏鍐典笅錛宱verhead鍑犱箮鏄?錛屼綔鑰呰嚜縐版晥鐜囨槸log4cxx鐨勬暟鍊嶏紝浣嗕篃渚濊禆浜嶴TLSoft錛堣櫧鐒跺彧鏈夊ご鏂囦歡錛?鍏舵墦鍖呮柟寮忎篃璁╀漢鎯抽伩鑰岃繙涔嬶紝榪樿鐢ㄤ綔鑰呰嚜宸卞啓鐨勭増鏈夋嫨鍣ㄦ潵閫変竴涓悎閫傜殑搴擄紙Win鐨勬儏鍐碉級銆?br>
榪樻湁涓涓槸Boost鐨刲ogging搴擄紝鐢ㄥ敖浜嗘ā鏉挎妧宸э紝铏界劧寰堢偒錛屽綋鏃舵病澶氬皯鐢紝涔熸病鏈夐氳繃boost 涓ユ牸鐨剅eview錛岃櫧鐒舵槸涓撳鍐欑殑錛屾殏鏃朵篃娌℃椂闂磋瘎浼板拰瀛︿範浜嗐?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[闂叉潵鏃犱簨錛岀炕鐪婫NU鐨勯偖浠跺垪琛紝鍙戠幇4.4.0鐗堟湰宸茬粡鍙戝竷涓涓湀鏈変綑錛屽叾涓渶澶х殑鏀硅繘鑾繃浜巆++浜嗭紙涔熻鏄垜瀵筩++鐨勯儴鍒嗘渶涓哄叧娉ㄧ殑緙樻晠錛夛紝<a >ChangeLog</a>閲岃竟鐢氳嚦涓撻棬鍒椾簡涓涓?a >緗戦〉</a>鎻忚堪閽堝C++0x鐨勬敮鎸佺壒鎬э紝蹇嶄笉浣忎綋楠屼竴鎶娿?br><br>絎竴姝ヨ鍋氱殑鑷劧鏄墜鍔ㄧ紪璇慓CC鐨勬簮浠g爜浜嗭紝鍥犱負鎴戞病鏈夋壘鍒癉ebian鐗堟湰鐨勫崌綰у寘錛屽共鑴嗚嚜宸變笅杞斤紝鎴戝彧闇瑕乬cc-core鍜実++涓や釜鍖呭氨鍙互浜嗭紝涓涓?5M錛屼竴涓?M錛屼笅杞藉掓槸鎸洪『鍒╋紝鍑犲垎閽熷氨OK浜嗭紝鎺ヤ笅鏉ュ氨鏄紪璇戜簡銆傚父瑙佺殑婧愮爜緙栬瘧姝ラ灝監K浜嗭細<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>鎴戦亣鍒扮殑鏄湁涓や釜鍏充簬澶氬鐞嗗櫒鐨勫紑鍙戝簱渚濊禆錛宎pt-get寰堝鏄撳氨瀹夎涓婂幓浜嗐?br><br>緙栬瘧鐨勮繃紼嬪氨姣旇緝婕暱浜嗭紝鎴戠殑Pentium D 2.8G Dual Core媧葷敓鐢熷繖媧諱簡涓涓皬鍗堜紤鐨勬椂闂達紝璧鋒潵鍙戠幇榪樻病緙栬瘧瀹岋紝涓嶈繃鍗佸垎閽熶箣鍚庡氨鍙戠幇鎵鏈夌殑灝監K浜嗐?br><br>TR1鐨勫簱錛宐oost鐨勭ず渚嬫瘮杈冨ソ錛屽叾涓?a >絎?1绔?/a>鏈夎緇嗙殑鍒楄〃鍜岀敤娉曠畝瑕佽鏄庛傚弬鐓ч偅涓煡浜嗕竴涓婫CC鐨勫ご鏂囦歡錛屽湪<br>   /usr/local/include/c++/4.4.0/tr1/ 閲岃竟錛?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_fn榪欏嚑涓簱浜嗭紝鍐欎簡涓皬渚嬪瓙楠岃瘉涔嬶細<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>緙栬瘧涔嬪悗錛岃繍琛岀粨鏋滃涓嬶細<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> 鐢變簬鎴戠殑鐜涓嬶紝鏂扮増鐨刲itstdc++.so琚畨瑁呭湪浜?usr/local/lib64/涓嬭竟錛屾墍浠ラ渶瑕佹墜宸ユ寚瀹氬姩鎬佸簱鐨勮礬寰勶紙export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH鍗沖彲緇曡繃/usr/lib/libstdc++.so錛?<br><br>浼拌榪欎箞濂囧鐨勭壒鎬э紝榪涘叆宸ヤ笟搴旂敤榪樺緱涓嶅皯鏃墮棿鍚э紝楹葷儲鐨勬爣鍑嗗寲...<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.cqbus.com.cn" target="_blank">久久99精品久久久久婷婷</a>| <a href="http://www.banburi.cn" target="_blank">青青青国产精品国产精品久久久久 </a>| <a href="http://www.vaez.cn" target="_blank">污污内射久久一区二区欧美日韩</a>| <a href="http://www.gdlj2004.cn" target="_blank">国产精品成人精品久久久</a>| <a href="http://www.bbs020.cn" target="_blank">久久精品亚洲欧美日韩久久 </a>| <a href="http://www.czyhfzc.cn" target="_blank">国产成年无码久久久免费</a>| <a href="http://www.greektaverna.cn" target="_blank">久久精品国产男包</a>| <a href="http://www.51hitjj.cn" target="_blank">国产激情久久久久影院老熟女 </a>| <a href="http://www.xiatiancaiwu.cn" target="_blank">97精品依人久久久大香线蕉97</a>| <a href="http://www.jsiwl.cn" target="_blank">日韩人妻无码一区二区三区久久</a>| <a href="http://www.popotang.cn" target="_blank">成人精品一区二区久久</a>| <a href="http://www.suec.net.cn" target="_blank">亚洲伊人久久综合中文成人网</a>| <a href="http://www.gjvthsj.cn" target="_blank">97久久精品人人澡人人爽</a>| <a href="http://www.mingqingrong.cn" target="_blank">亚洲午夜久久久久妓女影院</a>| <a href="http://www.lzjrdfl.cn" target="_blank">久久99国产精品久久99</a>| <a href="http://www.80008000.cn" target="_blank">国内精品久久久久伊人av</a>| <a href="http://www.yanggroup.cn" target="_blank">久久精品国产精品亜洲毛片</a>| <a href="http://www.beibeiyou.cn" target="_blank">精品国产乱码久久久久软件</a>| <a href="http://www.hldqptt.net.cn" target="_blank">久久精品成人免费看</a>| <a href="http://www.yxwelding.com.cn" target="_blank">久久婷婷五月综合色奶水99啪</a>| <a href="http://www.smash6.cn" target="_blank">日本道色综合久久影院</a>| <a href="http://www.alexa178.cn" target="_blank">欧美牲交A欧牲交aⅴ久久</a>| <a href="http://www.by8d5c.cn" target="_blank">久久亚洲天堂</a>| <a href="http://www.mk606.cn" target="_blank">亚洲欧洲久久久精品</a>| <a href="http://www.yhlj.net.cn" target="_blank">99久久精品国产一区二区三区 </a>| <a href="http://www.0769zc.net.cn" target="_blank">亚洲精品成人网久久久久久</a>| <a href="http://www.yzzdj.cn" target="_blank">MM131亚洲国产美女久久</a>| <a href="http://www.tengfangwang.cn" target="_blank">国产精品久久久香蕉</a>| <a href="http://www.njcwhs.cn" target="_blank">久久狠狠爱亚洲综合影院 </a>| <a href="http://www.9dqmu.cn" target="_blank">无码人妻精品一区二区三区久久久</a>| <a href="http://www.witvb.cn" target="_blank">久久午夜夜伦鲁鲁片免费无码影视</a>| <a href="http://www.taobaomaiba.cn" target="_blank">国产麻豆精品久久一二三</a>| <a href="http://www.wwmw.com.cn" target="_blank">97久久国产露脸精品国产</a>| <a href="http://www.uzfz.cn" target="_blank">欧美激情一区二区久久久</a>| <a href="http://www.sunyu-display.cn" target="_blank">久久久久久亚洲精品无码</a>| <a href="http://www.pjov.cn" target="_blank">久久国产精品免费一区</a>| <a href="http://www.84448.com.cn" target="_blank">亚洲国产成人久久精品99</a>| <a href="http://www.meedow.cn" target="_blank">精品久久久久久久中文字幕 </a>| <a href="http://www.lzcoxag.cn" target="_blank">久久久国产亚洲精品</a>| <a href="http://www.gg4493.cn" target="_blank">亚洲精品美女久久777777</a>| <a href="http://www.ssgov.cn" target="_blank">99久久精品免费看国产一区二区三区</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>