锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美日韩一区在线播放,亚洲欧美日韩国产中文,亚洲久色影视http://m.shnenglu.com/tommy/archive/2006/04/22/6077.htmlTommy LiangTommy LiangSat, 22 Apr 2006 04:48:00 GMThttp://m.shnenglu.com/tommy/archive/2006/04/22/6077.htmlhttp://m.shnenglu.com/tommy/comments/6077.htmlhttp://m.shnenglu.com/tommy/archive/2006/04/22/6077.html#Feedback0http://m.shnenglu.com/tommy/comments/commentRss/6077.htmlhttp://m.shnenglu.com/tommy/services/trackbacks/6077.html
//聽knapSackSupportTest.cpp聽:聽瀹氫箟鎺у埗鍙板簲鐢ㄧ▼搴忕殑鍏ュ彛鐐廣?br />//

#include聽
"stdafx.h"

typedef聽__int64聽DT;

template
<int聽N>
struct聽factorial{
聽聽聽聽
staticconst聽DT聽value聽=聽N聽*聽factorial<N-1>::value;
}
;

template
<>
struct聽factorial<1>{
聽聽聽聽
staticconst聽DT聽value聽=1;
}
;
static聽DT聽arrFactorial[32];

int聽_tmain(int聽argc,聽_TCHAR*聽argv[])
{
聽聽聽聽arrFactorial[
1]聽=聽factorial<1>().value;
聽聽聽聽arrFactorial[
2]聽=聽factorial<2>().value;
聽聽聽聽arrFactorial[
3]聽=聽factorial<3>().value;
聽聽聽聽arrFactorial[
4]聽=聽factorial<4>().value;
聽聽聽聽arrFactorial[
5]聽=聽factorial<5>().value;
聽聽聽聽arrFactorial[
6]聽=聽factorial<6>().value;
聽聽聽聽arrFactorial[
7]聽=聽factorial<7>().value;
聽聽聽聽arrFactorial[
8]聽=聽factorial<8>().value;
聽聽聽聽arrFactorial[
9]聽=聽factorial<9>().value;
聽聽聽聽arrFactorial[
10]聽=聽factorial<10>().value;
聽聽聽聽arrFactorial[
11]聽=聽factorial<11>().value;
聽聽聽聽arrFactorial[
12]聽=聽factorial<12>().value;
聽聽聽聽arrFactorial[
13]聽=聽factorial<13>().value;
聽聽聽聽arrFactorial[
14]聽=聽factorial<14>().value;
聽聽聽聽arrFactorial[
15]聽=聽factorial<15>().value;
聽聽聽聽arrFactorial[
16]聽=聽factorial<16>().value;
聽聽聽聽arrFactorial[
17]聽=聽factorial<17>().value;
聽聽聽聽
聽聽聽聽
for(int聽i=1;i聽<18;i++)
聽聽聽聽
{
聽聽聽聽聽聽聽聽printf(
"factorial聽of聽%d=%u\n",i,arrFactorial[i]);
聽聽聽聽}
聽聽聽聽

聽聽聽聽
return0;
}




Tommy Liang 2006-04-22 12:48 鍙戣〃璇勮
]]>
璇諱功絎旇銆奀++璁捐鏂版濈淮銆?8) 杈圭晫鏍囪錛歂ullType鍜孍mptyTypehttp://m.shnenglu.com/tommy/archive/2006/02/06/3081.htmlTommy LiangTommy LiangSun, 05 Feb 2006 17:29:00 GMThttp://m.shnenglu.com/tommy/archive/2006/02/06/3081.htmlhttp://m.shnenglu.com/tommy/comments/3081.htmlhttp://m.shnenglu.com/tommy/archive/2006/02/06/3081.html#Feedback0http://m.shnenglu.com/tommy/comments/commentRss/3081.htmlhttp://m.shnenglu.com/tommy/services/trackbacks/3081.html涔﹂噷闈㈣鐨勮繖涓瘝錛?BR>鍨嬪埆璁$畻鐨勮竟鐣屾爣璁?BR>
NullType鍙湁澹版槑娌℃湁瀹氫箟銆?/P>
class NullType;
榪欐槸涓轟簡琛ㄨ揪鈥滄垜涓嶆槸涓護浜烘劅鍏磋叮鐨勫瀷鍒濓紝鍙互浣滀負鈥滄壘涓嶅埌鍨嬪埆鈥濈殑娑堟伅鏍囪銆傜被浼糪0榪欐牱銆?BR>
EmptyType錛屽氨鏄竴涓┖綾?BR>
struct EmptyType {};

榪欐槸鍙緇ф壙鐨勫悎娉曞瀷鍒紝鍙互浣滀負template鐨勭己鐪佸弬鏁板瀷鍒?img src ="http://m.shnenglu.com/tommy/aggbug/3081.html" width = "1" height = "1" />

Tommy Liang 2006-02-06 01:29 鍙戣〃璇勮
]]>
璇諱功絎旇銆奀++璁捐鏂版濈淮銆?7) std::type_info綾葷殑鍖呰綾?/title><link>http://m.shnenglu.com/tommy/archive/2006/02/06/3080.html</link><dc:creator>Tommy Liang</dc:creator><author>Tommy Liang</author><pubDate>Sun, 05 Feb 2006 17:20:00 GMT</pubDate><guid>http://m.shnenglu.com/tommy/archive/2006/02/06/3080.html</guid><wfw:comment>http://m.shnenglu.com/tommy/comments/3080.html</wfw:comment><comments>http://m.shnenglu.com/tommy/archive/2006/02/06/3080.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/tommy/comments/commentRss/3080.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/tommy/services/trackbacks/3080.html</trackback:ping><description><![CDATA[std::type_info綾誨彲浠ュ湪鎵ц鏈熼棿鏌ヨ瀵硅薄鍨嬪埆錛屼絾浣跨敤璧鋒潵姣旇緝楹葷儲銆備負姝ゅ畾涔変簡wrapper<BR><BR>涓嬮潰鐨勪唬鐮佸嚭鑷?Loki搴擄細<BR>鎬誨緱鏉ヨ鏄彁渚涗簡std::type_info鐨勬墍鏈夋垚鍛樺嚱鏁幫紱<BR>鎻愪緵浜唙alue璇箟錛屽嵆public copy鏋勯犲嚱鏁板拰public assignment鎿嶄綔絎︼紱<BR>瀹氫箟浜?operator< 鍜?operator== 絳?BR><BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN style="COLOR: #000000"> Loki<BR><IMG id=Codehighlighter1_15_1994_Open_Image onclick="this.style.display='none'; Codehighlighter1_15_1994_Open_Text.style.display='none'; Codehighlighter1_15_1994_Closed_Image.style.display='inline'; Codehighlighter1_15_1994_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_15_1994_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_15_1994_Closed_Text.style.display='none'; Codehighlighter1_15_1994_Open_Image.style.display='inline'; Codehighlighter1_15_1994_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_15_1994_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_15_1994_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_17_97_Open_Image onclick="this.style.display='none'; Codehighlighter1_17_97_Open_Text.style.display='none'; Codehighlighter1_17_97_Closed_Image.style.display='inline'; Codehighlighter1_17_97_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_17_97_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_17_97_Closed_Text.style.display='none'; Codehighlighter1_17_97_Open_Image.style.display='inline'; Codehighlighter1_17_97_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_17_97_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN id=Codehighlighter1_17_97_Open_Text><SPAN style="COLOR: #808080">//////////////////////////////////////////////////////////////////////////////</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #808080"></SPAN></SPAN><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> class TypeInfo<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Purpose: offer a first-class, comparable wrapper over std::type_info</SPAN><SPAN style="COLOR: #008000"><BR><IMG id=Codehighlighter1_188_268_Open_Image onclick="this.style.display='none'; Codehighlighter1_188_268_Open_Text.style.display='none'; Codehighlighter1_188_268_Closed_Image.style.display='inline'; Codehighlighter1_188_268_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_188_268_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_188_268_Closed_Text.style.display='none'; Codehighlighter1_188_268_Open_Image.style.display='inline'; Codehighlighter1_188_268_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_188_268_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN id=Codehighlighter1_188_268_Open_Text><SPAN style="COLOR: #808080">//////////////////////////////////////////////////////////////////////////////</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #808080"></SPAN></SPAN><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> TypeInfo<BR><IMG id=Codehighlighter1_293_699_Open_Image onclick="this.style.display='none'; Codehighlighter1_293_699_Open_Text.style.display='none'; Codehighlighter1_293_699_Closed_Image.style.display='inline'; Codehighlighter1_293_699_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_293_699_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_293_699_Closed_Text.style.display='none'; Codehighlighter1_293_699_Open_Image.style.display='inline'; Codehighlighter1_293_699_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_293_699_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_293_699_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">:<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Constructors</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">        TypeInfo(); </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> needed for containers</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">        TypeInfo(</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> std::type_info</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000">); </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> non-explicit<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Access for the wrapped std::type_info</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">        </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> std::type_info</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> Get() </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Compatibility functions</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">        </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> before(</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> rhs) </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> name() </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">:<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> std::type_info</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> pInfo_;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    <BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Implementation</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">    <BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    inline TypeInfo::TypeInfo()<BR><IMG id=Codehighlighter1_766_849_Open_Image onclick="this.style.display='none'; Codehighlighter1_766_849_Open_Text.style.display='none'; Codehighlighter1_766_849_Closed_Image.style.display='inline'; Codehighlighter1_766_849_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_766_849_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_766_849_Closed_Text.style.display='none'; Codehighlighter1_766_849_Open_Image.style.display='inline'; Codehighlighter1_766_849_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_766_849_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_766_849_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_786_787_Open_Image onclick="this.style.display='none'; Codehighlighter1_786_787_Open_Text.style.display='none'; Codehighlighter1_786_787_Closed_Image.style.display='inline'; Codehighlighter1_786_787_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_786_787_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_786_787_Closed_Text.style.display='none'; Codehighlighter1_786_787_Open_Image.style.display='inline'; Codehighlighter1_786_787_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> Nil </SPAN><SPAN id=Codehighlighter1_786_787_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_786_787_Open_Text><SPAN style="COLOR: #000000">{}</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        pInfo_ </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000">typeid(Nil);<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        assert(pInfo_);<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    <BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    inline TypeInfo::TypeInfo(</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> std::type_info</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> ti)<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    : pInfo_(</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000">ti)<BR><IMG id=Codehighlighter1_934_952_Open_Image onclick="this.style.display='none'; Codehighlighter1_934_952_Open_Text.style.display='none'; Codehighlighter1_934_952_Closed_Image.style.display='inline'; Codehighlighter1_934_952_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_934_952_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_934_952_Closed_Text.style.display='none'; Codehighlighter1_934_952_Open_Image.style.display='inline'; Codehighlighter1_934_952_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_934_952_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_934_952_Open_Text><SPAN style="COLOR: #000000">{ assert(pInfo_); }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    <BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    inline </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> TypeInfo::before(</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> rhs) </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_1023_1102_Open_Image onclick="this.style.display='none'; Codehighlighter1_1023_1102_Open_Text.style.display='none'; Codehighlighter1_1023_1102_Closed_Image.style.display='inline'; Codehighlighter1_1023_1102_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1023_1102_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1023_1102_Closed_Text.style.display='none'; Codehighlighter1_1023_1102_Open_Image.style.display='inline'; Codehighlighter1_1023_1102_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_1023_1102_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1023_1102_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        assert(pInfo_);<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> pInfo_</SPAN><SPAN style="COLOR: #000000">-></SPAN><SPAN style="COLOR: #000000">before(</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">rhs.pInfo_) </SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    inline </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> std::type_info</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> TypeInfo::Get() </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_1164_1218_Open_Image onclick="this.style.display='none'; Codehighlighter1_1164_1218_Open_Text.style.display='none'; Codehighlighter1_1164_1218_Closed_Image.style.display='inline'; Codehighlighter1_1164_1218_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1164_1218_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1164_1218_Closed_Text.style.display='none'; Codehighlighter1_1164_1218_Open_Image.style.display='inline'; Codehighlighter1_1164_1218_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_1164_1218_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1164_1218_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        assert(pInfo_);<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">pInfo_;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    <BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    inline </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> TypeInfo::name() </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_1275_1336_Open_Image onclick="this.style.display='none'; Codehighlighter1_1275_1336_Open_Text.style.display='none'; Codehighlighter1_1275_1336_Closed_Image.style.display='inline'; Codehighlighter1_1275_1336_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1275_1336_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1275_1336_Closed_Text.style.display='none'; Codehighlighter1_1275_1336_Open_Image.style.display='inline'; Codehighlighter1_1275_1336_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_1275_1336_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1275_1336_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        assert(pInfo_);<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> pInfo_</SPAN><SPAN style="COLOR: #000000">-></SPAN><SPAN style="COLOR: #000000">name();<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Comparison operators</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">    <BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    inline </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">operator</SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> lhs, </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> rhs)<BR><IMG id=Codehighlighter1_1441_1481_Open_Image onclick="this.style.display='none'; Codehighlighter1_1441_1481_Open_Text.style.display='none'; Codehighlighter1_1441_1481_Closed_Image.style.display='inline'; Codehighlighter1_1441_1481_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1441_1481_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1441_1481_Closed_Text.style.display='none'; Codehighlighter1_1441_1481_Open_Image.style.display='inline'; Codehighlighter1_1441_1481_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_1441_1481_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1441_1481_Open_Text><SPAN style="COLOR: #000000">{ </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> (lhs.Get() </SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000"> rhs.Get()) </SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">; }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    inline </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">operator</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> lhs, </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> rhs)<BR><IMG id=Codehighlighter1_1556_1582_Open_Image onclick="this.style.display='none'; Codehighlighter1_1556_1582_Open_Text.style.display='none'; Codehighlighter1_1556_1582_Closed_Image.style.display='inline'; Codehighlighter1_1556_1582_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1556_1582_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1556_1582_Closed_Text.style.display='none'; Codehighlighter1_1556_1582_Open_Image.style.display='inline'; Codehighlighter1_1556_1582_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_1556_1582_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1556_1582_Open_Text><SPAN style="COLOR: #000000">{ </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> lhs.before(rhs); }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    inline </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">operator</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> lhs, </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> rhs)<BR><IMG id=Codehighlighter1_1658_1682_Open_Image onclick="this.style.display='none'; Codehighlighter1_1658_1682_Open_Text.style.display='none'; Codehighlighter1_1658_1682_Closed_Image.style.display='inline'; Codehighlighter1_1658_1682_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1658_1682_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1658_1682_Closed_Text.style.display='none'; Codehighlighter1_1658_1682_Open_Image.style.display='inline'; Codehighlighter1_1658_1682_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_1658_1682_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1658_1682_Open_Text><SPAN style="COLOR: #000000">{ </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">!</SPAN><SPAN style="COLOR: #000000">(lhs </SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000"> rhs); }</SPAN></SPAN><SPAN style="COLOR: #000000">    <BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    <BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    inline </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">operator</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> lhs, </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> rhs)<BR><IMG id=Codehighlighter1_1765_1785_Open_Image onclick="this.style.display='none'; Codehighlighter1_1765_1785_Open_Text.style.display='none'; Codehighlighter1_1765_1785_Closed_Image.style.display='inline'; Codehighlighter1_1765_1785_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1765_1785_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1765_1785_Closed_Text.style.display='none'; Codehighlighter1_1765_1785_Open_Image.style.display='inline'; Codehighlighter1_1765_1785_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_1765_1785_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1765_1785_Open_Text><SPAN style="COLOR: #000000">{ </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> rhs </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000"> lhs; }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    <BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    inline </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">operator</SPAN><SPAN style="COLOR: #000000"><=</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> lhs, </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> rhs)<BR><IMG id=Codehighlighter1_1865_1888_Open_Image onclick="this.style.display='none'; Codehighlighter1_1865_1888_Open_Text.style.display='none'; Codehighlighter1_1865_1888_Closed_Image.style.display='inline'; Codehighlighter1_1865_1888_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1865_1888_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1865_1888_Closed_Text.style.display='none'; Codehighlighter1_1865_1888_Open_Image.style.display='inline'; Codehighlighter1_1865_1888_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_1865_1888_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1865_1888_Open_Text><SPAN style="COLOR: #000000">{ </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">!</SPAN><SPAN style="COLOR: #000000">(lhs </SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> rhs); }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>     <BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    inline </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">operator</SPAN><SPAN style="COLOR: #000000">>=</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> lhs, </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> TypeInfo</SPAN><SPAN style="COLOR: #000000">&</SPAN><SPAN style="COLOR: #000000"> rhs)<BR><IMG id=Codehighlighter1_1969_1992_Open_Image onclick="this.style.display='none'; Codehighlighter1_1969_1992_Open_Text.style.display='none'; Codehighlighter1_1969_1992_Closed_Image.style.display='inline'; Codehighlighter1_1969_1992_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1969_1992_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1969_1992_Closed_Text.style.display='none'; Codehighlighter1_1969_1992_Open_Image.style.display='inline'; Codehighlighter1_1969_1992_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_1969_1992_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1969_1992_Open_Text><SPAN style="COLOR: #000000">{ </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">!</SPAN><SPAN style="COLOR: #000000">(lhs </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000"> rhs); }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN></DIV><img src ="http://m.shnenglu.com/tommy/aggbug/3080.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/tommy/" target="_blank">Tommy Liang</a> 2006-02-06 01:20 <a href="http://m.shnenglu.com/tommy/archive/2006/02/06/3080.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>璇諱功絎旇銆奀++璁捐鏂版濈淮銆?6) 緙栬瘧鏈熼棿渚︽祴緇ф壙鎬?/title><link>http://m.shnenglu.com/tommy/archive/2006/02/06/3079.html</link><dc:creator>Tommy Liang</dc:creator><author>Tommy Liang</author><pubDate>Sun, 05 Feb 2006 17:11:00 GMT</pubDate><guid>http://m.shnenglu.com/tommy/archive/2006/02/06/3079.html</guid><wfw:comment>http://m.shnenglu.com/tommy/comments/3079.html</wfw:comment><comments>http://m.shnenglu.com/tommy/archive/2006/02/06/3079.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/tommy/comments/commentRss/3079.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/tommy/services/trackbacks/3079.html</trackback:ping><description><![CDATA[鍦ㄧ紪璇戞椂鍒伙紝鍦–onversion綾諱腑浜х敓涓や釜甯告暟錛堢紪璇戝櫒甯繖璁$畻錛?BR><BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">template </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> T,</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> U</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> Conversion<BR><IMG id=Codehighlighter1_44_154_Open_Image onclick="this.style.display='none'; Codehighlighter1_44_154_Open_Text.style.display='none'; Codehighlighter1_44_154_Closed_Image.style.display='inline'; Codehighlighter1_44_154_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_44_154_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_44_154_Closed_Text.style.display='none'; Codehighlighter1_44_154_Open_Image.style.display='inline'; Codehighlighter1_44_154_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_44_154_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_44_154_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">:<BR><IMG id=Codehighlighter1_67_116_Open_Image onclick="this.style.display='none'; Codehighlighter1_67_116_Open_Text.style.display='none'; Codehighlighter1_67_116_Closed_Image.style.display='inline'; Codehighlighter1_67_116_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_67_116_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_67_116_Closed_Text.style.display='none'; Codehighlighter1_67_116_Open_Image.style.display='inline'; Codehighlighter1_67_116_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">enum</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN id=Codehighlighter1_67_116_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_67_116_Open_Text><SPAN style="COLOR: #000000">{ exists2Way </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> exists </SPAN><SPAN style="COLOR: #000000">&&</SPAN><SPAN style="COLOR: #000000"> Conversion</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">U,T</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">::exists }</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR><IMG id=Codehighlighter1_132_151_Open_Image onclick="this.style.display='none'; Codehighlighter1_132_151_Open_Text.style.display='none'; Codehighlighter1_132_151_Closed_Image.style.display='inline'; Codehighlighter1_132_151_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_132_151_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_132_151_Closed_Text.style.display='none'; Codehighlighter1_132_151_Open_Image.style.display='inline'; Codehighlighter1_132_151_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">enum</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN id=Codehighlighter1_132_151_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_132_151_Open_Text><SPAN style="COLOR: #000000">{ sameType </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000"> }</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000">;</SPAN></DIV>涓涓槸 exists2Way錛岃〃紺烘槸鍚﹀彲浠ヤ袱涓被鍨嬩簰鐩歌漿鎹紝<BR>sameType 琛ㄧず T鍜孶鏄惁鍚屼竴涓被鍨嬨?BR>涓嶈繃錛岃櫧鐒朵功閲岃繖涔堣錛屾垜鎬庝箞閮芥悶涓嶆噦涓轟粈涔堣繖鏍峰彲浠ワ紝嫻嬭瘯涔熸槸涓嶅鐨勶紝闅鵑亾榪欎釜sameType鐨勫啓娉曡繕鏈夊埆鐨勫ゥ濡欙紵<BR>涓嶈繃涓嬮潰榪欎釜鍋忕壒鐨勫啓娉曞掓槸姣旇緝瀹規槗鐞嗚В錛?BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">template </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> T</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> Conversion</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">T,T</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_41_101_Open_Image onclick="this.style.display='none'; Codehighlighter1_41_101_Open_Text.style.display='none'; Codehighlighter1_41_101_Closed_Image.style.display='inline'; Codehighlighter1_41_101_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_41_101_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_41_101_Closed_Text.style.display='none'; Codehighlighter1_41_101_Open_Image.style.display='inline'; Codehighlighter1_41_101_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_41_101_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_41_101_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">:<BR><IMG id=Codehighlighter1_57_98_Open_Image onclick="this.style.display='none'; Codehighlighter1_57_98_Open_Text.style.display='none'; Codehighlighter1_57_98_Closed_Image.style.display='inline'; Codehighlighter1_57_98_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_57_98_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_57_98_Closed_Text.style.display='none'; Codehighlighter1_57_98_Open_Image.style.display='inline'; Codehighlighter1_57_98_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">enum</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN id=Codehighlighter1_57_98_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_57_98_Open_Text><SPAN style="COLOR: #000000">{ exists </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">,exists2Way </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">,sameType </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000"> }</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000">;</SPAN></DIV>榪欎釜嫻嬭瘯鏄疧K鐨勩?BR><BR>鏈変簡榪欏嚑涓父鏁幫紝瑕佸喅瀹氫袱涓猚lass涔嬮棿鏄惁瀛樺湪緇ф壙鍏崇郴灝辨瘮杈冨鏄撲簡錛?BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">#define</SPAN><SPAN style="COLOR: #000000"> SUPERSUBCLASS(T,U) \</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top>(Conversion</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> U</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> T</SPAN><SPAN style="COLOR: #000000">*></SPAN><SPAN style="COLOR: #000000">::exists </SPAN><SPAN style="COLOR: #000000">&&</SPAN><SPAN style="COLOR: #000000"> \<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">!</SPAN><SPAN style="COLOR: #000000">Conversion</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> T</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">*></SPAN><SPAN style="COLOR: #000000">::sameType)</SPAN></DIV>濡傛灉U鏄痯ublic緇ф壙鑷猅錛屾垨鑰匱鍜孶鏄悓涓涓被錛岄偅涔圫UPERSUBCLASS(T,U)浼犲洖true錛岃繖閲屾槸鎶婃煇涓猚lass瑙嗕負鑷繁鐨勮秴綾伙紝鏇翠弗璋ㄧ殑鍋氭硶鏄細<BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">#define</SPAN><SPAN style="COLOR: #000000"> SUPERSUBCLASS_STRICT(T,U) \</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top>(SUPERSUBCLASS(T,U) </SPAN><SPAN style="COLOR: #000000">&&</SPAN><SPAN style="COLOR: #000000"> \<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">!</SPAN><SPAN style="COLOR: #000000">Conversion</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> T, </SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN style="COLOR: #000000"> U</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">::sameType)</SPAN></DIV>鍗蟲帓闄涓嶶鏄悓涓涓被鍨嬬殑鎯呭喌銆?BR><BR>鍙﹀錛屽姞涓?const 鏄負浜?闃叉鍥犱負 const 鑰屽鑷磋漿鍨嬪け璐ワ紝瀵逛簬宸茬粡鏄痗onst鐨勪笢瑗垮啀const涓嬈$殑璇濆悗闈竴嬈$殑const浼氬拷鐣ユ帀銆?BR><BR>鍐嶏紝榪欎釜瀹忕殑鍚嶅瓧寰堟竻鏅幫紝灝辨槸 瓚呯被--瀛愮被錛?鍓嶉潰閭d釜T鏄秴綾伙紝U鏄瓙綾伙紝榪欎釜鍛藉悕姣?INHERITS瑕佸ソ銆?img src ="http://m.shnenglu.com/tommy/aggbug/3079.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/tommy/" target="_blank">Tommy Liang</a> 2006-02-06 01:11 <a href="http://m.shnenglu.com/tommy/archive/2006/02/06/3079.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>璇諱功絎旇銆奀++璁捐鏂版濈淮銆?5) 緙栬瘧鏈熼棿渚︽祴鍙漿鎹㈡?/title><link>http://m.shnenglu.com/tommy/archive/2006/02/05/3059.html</link><dc:creator>Tommy Liang</dc:creator><author>Tommy Liang</author><pubDate>Sat, 04 Feb 2006 21:34:00 GMT</pubDate><guid>http://m.shnenglu.com/tommy/archive/2006/02/05/3059.html</guid><wfw:comment>http://m.shnenglu.com/tommy/comments/3059.html</wfw:comment><comments>http://m.shnenglu.com/tommy/archive/2006/02/05/3059.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://m.shnenglu.com/tommy/comments/commentRss/3059.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/tommy/services/trackbacks/3059.html</trackback:ping><description><![CDATA[灝辨槸榪欐牱涓涓被錛?BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">template </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> T,</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> U</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> Conversion<BR><IMG id=Codehighlighter1_44_230_Open_Image onclick="this.style.display='none'; Codehighlighter1_44_230_Open_Text.style.display='none'; Codehighlighter1_44_230_Closed_Image.style.display='inline'; Codehighlighter1_44_230_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_44_230_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_44_230_Closed_Text.style.display='none'; Codehighlighter1_44_230_Open_Image.style.display='inline'; Codehighlighter1_44_230_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_44_230_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_44_230_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    typedef </SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000"> Small;<BR><IMG id=Codehighlighter1_78_95_Open_Image onclick="this.style.display='none'; Codehighlighter1_78_95_Open_Text.style.display='none'; Codehighlighter1_78_95_Closed_Image.style.display='inline'; Codehighlighter1_78_95_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_78_95_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_78_95_Closed_Text.style.display='none'; Codehighlighter1_78_95_Open_Image.style.display='inline'; Codehighlighter1_78_95_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> Big </SPAN><SPAN id=Codehighlighter1_78_95_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_78_95_Open_Text><SPAN style="COLOR: #000000">{ </SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000"> dummy[</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">]; }</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> Small Test(U);<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> Big Test(<IMG src="http://m.shnenglu.com/images/dot.gif">);<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> T MakeT();<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">:<BR><IMG id=Codehighlighter1_177_227_Open_Image onclick="this.style.display='none'; Codehighlighter1_177_227_Open_Text.style.display='none'; Codehighlighter1_177_227_Closed_Image.style.display='inline'; Codehighlighter1_177_227_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_177_227_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_177_227_Closed_Text.style.display='none'; Codehighlighter1_177_227_Open_Image.style.display='inline'; Codehighlighter1_177_227_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">enum</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN id=Codehighlighter1_177_227_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_177_227_Open_Text><SPAN style="COLOR: #000000">{ exists </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">sizeof</SPAN><SPAN style="COLOR: #000000">(Test(MakeT())) </SPAN><SPAN style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">sizeof</SPAN><SPAN style="COLOR: #000000">(Small) }</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000">;</SPAN></DIV><BR>鍏充簬鍑芥暟 Small Test(U) 鍜?Big Test(...) 錛屼功閲岄潰璇達細<BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">銆傘傘傞渶瑕佷袱涓噸杞藉嚱鏁幫紝鍏朵竴濡傚厛鍓嶆墍璇達紝鎺ュ彈涓涓猆瀵硅薄騫朵紶鍥炰竴涓猄mall瀵硅薄錛?BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top>Small Test(U);<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top>浣嗘帴涓嬫潵錛屾垜璇ュ浣曞啓鍑轟竴涓彲鎺ュ彈浠諱綍鍏朵粬縐嶅璞$殑鍑芥暟鍛紵銆傘傘傘?/SPAN></DIV><BR>鎴戣寰楄繖涓湴鏂圭炕璇戝緱鏈夌偣闂錛屾槸涓嶆槸搴旇璇達細鈥溿傘傛垜璇ュ浣曞啓鍑轟竴涓彲鎺ュ彈浠諱綍<STRONG><FONT color=#ff0000>鍙﹀涓縐嶇被鍨嬶紙鍗?T錛夌殑</FONT></STRONG>瀵硅薄鐨勫嚱鏁板憿銆傘傗濓紝鍥犱負榪欓噷灝辨槸 T鍜孶鍢涳紝 娌℃湁浠涔堚滃叾浠栫鈥濓紝榪欐牱緲昏瘧瀹規槗璁╂垜榪鋒儜涓嶈В浜嗕竴浼氬効銆?BR><BR><STRONG><FONT color=#ff1493>濡傛灉鎺ュ彈 U鐨勯偅涓嚱鏁拌璋冪敤錛屽垯T鍙互琚漿鎹負 U錛屽惁鍒欐棤娉曡漿鎹紝榪欎釜鏄濊礬鐨勬牴鏈?/FONT></STRONG><BR><BR>涓轟粈涔堣鍋氫竴涓?MakeT榪欐牱鐨勫嚱鏁拌屼笉鐩存帴浣跨敤T鍛紵 榪欐槸涓轟簡婊¤凍褰?T 鍙湁縐佹湁鏋勯犲嚱鏁扮殑鎯呭喌錛屽浜庣紪璇戝櫒鏉ヨ錛宻izeof 鏄湪緙栬瘧鏈熷畬鎴愯瘎浼扮殑錛屾墍浠ワ紝MakeT 閲岄潰鍒板簳鍋氫簡浠涔堝茍涓嶉噸瑕侊紝閲嶈鐨勬槸浠栬繑鍥炵殑綾誨瀷錛屾槸 T錛屾墍浠ワ紝浣滆呭緢鍏村鍦拌錛岃繖鏄竴涓?StrawMan function錛屽嵆鈥滅ɑ鑽変漢鍑芥暟鈥濓紝鍝堝搱錛屽彧鏄竴涓牱瀛愯屽凡錛屼絾鏄繖宸茬粡瓚沖浜嗭紝閭d袱涓噸杞界殑Test鏂規硶涔熸槸涓鏍鳳紝榪欓噷鎴戜滑涓嶅叧蹇冧粬鐨勫嚱鏁頒綋銆傚己鍟婏紝鐖芥姝紝蹇劅鐨勬簮娉夊晩<BR><BR>嫻嬭瘯浠g爜濡備笅錛?BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">    </SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN style="COLOR: #000000"> std;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top>    cout </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> Conversion</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">::exists </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><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top>        </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> Conversion</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #0000ff">char</SPAN><SPAN style="COLOR: #000000">*></SPAN><SPAN style="COLOR: #000000">::exists </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><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top>        </SPAN><SPAN style="COLOR: #000000"><<</SPAN><SPAN style="COLOR: #000000"> Conversion</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">size_t, vector</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">></SPAN><SPAN style="COLOR: #000000">::exists </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></DIV>杈撳嚭錛?1 0 0<BR>double鍙互杞崲涓?int<BR>char 涓嶈兘杞崲涓?char* <BR>vector<int> 鏄竴涓鍣ㄧ殑鏋勯犲嚱鏁幫紝size_t 涓嶈兘杞崲錛屽洜涓鴻繖涓瀯閫犲嚱鏁版槸 explicit鐨?榪欎釜鍦版柟榪樻槸鏈夌偣榪風硦錛岃繕寰楃爺絀朵竴涓嬨?img src ="http://m.shnenglu.com/tommy/aggbug/3059.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/tommy/" target="_blank">Tommy Liang</a> 2006-02-05 05:34 <a href="http://m.shnenglu.com/tommy/archive/2006/02/05/3059.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>璇諱功絎旇銆奀++璁捐鏂版濈淮銆?4) Type Selectionhttp://m.shnenglu.com/tommy/archive/2006/02/05/3057.htmlTommy LiangTommy LiangSat, 04 Feb 2006 20:53:00 GMThttp://m.shnenglu.com/tommy/archive/2006/02/05/3057.htmlhttp://m.shnenglu.com/tommy/comments/3057.htmlhttp://m.shnenglu.com/tommy/archive/2006/02/05/3057.html#Feedback0http://m.shnenglu.com/tommy/comments/commentRss/3057.htmlhttp://m.shnenglu.com/tommy/services/trackbacks/3057.html
鏈夋椂鍊欙紝鑼冨瀷紼嬪簭闇瑕佹牴鎹竴涓猙oolean鍙橀噺鏉ラ夋嫨鏌愪釜鍨嬪埆鎴栧彟涓涓瀷鍒?BR>涓嬮潰瀹氫箟鐨勭粨鏋勬彁鍑轟簡瑙e喅鏂規錛?BR>
template <bool flag,typename T,typename U>
struct Select
{
    typedef T Result;
}
;
//鍋忕壒鍖?/SPAN>
template <typename T,typename U>
struct Select<false,T,U>
{
    typedef U Result;
}
;
涔熷氨鏄錛屽鏋渇lag鏄痶rue錛屽垯緙栬瘧鍣ㄤ嬌鐢ㄧ涓浠藉畾涔夛紝鍗砇esult琚畾涔変負T錛?BR>濡傛灉鏄痜alse,鍒欏亸鐗瑰寲鏈哄埗璧蜂綔鐢紝Result琚畾涔変負 U

鍋忕壒鍖栫湡寮猴紝鍏ㄥ湪涔庢兂璞″姏浜?img src ="http://m.shnenglu.com/tommy/aggbug/3057.html" width = "1" height = "1" />

Tommy Liang 2006-02-05 04:53 鍙戣〃璇勮
]]>
璇諱功絎旇銆奀++璁捐鏂版濈淮銆?3) Type2Type鐨勬剰涔?http://m.shnenglu.com/tommy/archive/2006/02/05/3056.htmlTommy LiangTommy LiangSat, 04 Feb 2006 20:40:00 GMThttp://m.shnenglu.com/tommy/archive/2006/02/05/3056.htmlhttp://m.shnenglu.com/tommy/comments/3056.htmlhttp://m.shnenglu.com/tommy/archive/2006/02/05/3056.html#Feedback0http://m.shnenglu.com/tommy/comments/commentRss/3056.htmlhttp://m.shnenglu.com/tommy/services/trackbacks/3056.html灝辨槸榪欐牱涓涓粨鏋勶細

template <typename T>
struct Type2Type
{
    typedef T OriginalType;    
}
;

鍋囧畾鏈変釜鐗囨柇濡備笅錛屽垱寤轟竴涓猅*
template <class T,class U>
T
* Create(const U& arg)
{
    
return new T(arg);
}

濡傛灉瀵逛簬鏌愪釜綾誨鈥淲idget鈥濓紝鍏禼tor瑕佹湁涓や釜鍙傛暟錛屾瘮濡傜浜屼釜鍙傛暟蹇呴』鏄?1錛堝浜庢棫鐨勪唬鐮佹潵璇達紝璋佺煡閬撳憿:)錛夛紝浣嗗張涓嶆兂鍙﹀鍒涘緩涓涓淐reateWidget鈥濇柟娉曪紝閭d箞鎬庝箞鍔炲憿錛屽嚱鏁版槸涓嶈兘鍋忕壒鍖栫殑錛屽嵆濡備笅浠g爜錛?BR>
//閿欒鐨勪唬鐮?BR>template <class U>
Widget
* Create<Widget,U>(const U& arg)
{
    
return new Widget(arg,-1);
}
鍦?VC7涓嬩細鎶ュ憡錛氶潪娉曚嬌鐢ㄦ樉寮忔ā鏉垮弬鏁?BR>
鍙兘浣跨敤鍑芥暟閲嶈澆錛屾瘮濡傦細
template <class T,class U>
T
* Create(const U&arg,T /*铏氭嫙*/)
{
   
return new T(arg);
}


template 
<class U>
Widget 
* Create(const U& arg, Widget /*铏氭嫙*/)
{
    
return new Widget(arg,-1);
}

  榪欐牱鏄彲浠ヨВ鍐抽棶棰橈紝浣嗘渶澶х殑姣涚梾鍦ㄤ簬榪愯鏃舵瀯閫犱簡 鏈浣跨敤鐨勫璞¤繖涓紑閿錛堣櫄鎷熺殑Widget鍙傛暟錛夈傝繖鏃?Type2Type 榪欎釜鍜氬挌鍑哄満浜嗭紝鎸夌収涔︾殑璇存硶錛岃繖鏄滀竴涓瀷鍒唬琛ㄧ墿銆佷竴涓彲浠ヨ浣犱紶緇欓噸杞藉嚱鏁扮殑杞婚噺綰D鈥濓紝濡備笅錛?BR>

template <class T,class U>
T
* Create(const U& arg,Type2Type<T>)
{
    
return new T(arg);
}


template 
<class U>
Widget 
* Create(const U& arg,Type2Type<Widget>)
{
    
return new Widget(arg,-1);
}


璋冪敤鏂癸細
String 
*pStr = Create("hello",Type2Type<String>());
Widget 
*pW = Create(100,Type2Type<Widget>());

 

鍏抽敭鏄紝榪欎釜涓滆タ涔熸槸緇欑紪璇戝櫒鐪嬬殑錛屽



Tommy Liang 2006-02-05 04:40 鍙戣〃璇勮
]]>
璇諱功絎旇銆奀++璁捐鏂版濈淮銆?2) Int2Type鐨勬剰涔?/title><link>http://m.shnenglu.com/tommy/archive/2006/01/24/2996.html</link><dc:creator>Tommy Liang</dc:creator><author>Tommy Liang</author><pubDate>Mon, 23 Jan 2006 18:20:00 GMT</pubDate><guid>http://m.shnenglu.com/tommy/archive/2006/01/24/2996.html</guid><wfw:comment>http://m.shnenglu.com/tommy/comments/2996.html</wfw:comment><comments>http://m.shnenglu.com/tommy/archive/2006/01/24/2996.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/tommy/comments/commentRss/2996.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/tommy/services/trackbacks/2996.html</trackback:ping><description><![CDATA[<P>灝辨槸榪欎箞涓涓ā鏉跨粨鏋勶紝鎵鏈夌殑浠峰煎湪浜庣紪璇戞椂鍒繪牴鎹父鏁拌皟鐢ㄤ笉鍚屽嚱鏁版垨鑰呯紪璇戞湡瀹炴柦緙栬瘧鍒嗘敮鐨勫垎媧俱?/P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">template </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> v</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">struct</SPAN><SPAN style="COLOR: #000000"> Int2Type<BR><IMG id=Codehighlighter1_33_56_Open_Image onclick="this.style.display='none'; Codehighlighter1_33_56_Open_Text.style.display='none'; Codehighlighter1_33_56_Closed_Image.style.display='inline'; Codehighlighter1_33_56_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_33_56_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_33_56_Closed_Text.style.display='none'; Codehighlighter1_33_56_Open_Image.style.display='inline'; Codehighlighter1_33_56_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_33_56_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_33_56_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_41_53_Open_Image onclick="this.style.display='none'; Codehighlighter1_41_53_Open_Text.style.display='none'; Codehighlighter1_41_53_Closed_Image.style.display='inline'; Codehighlighter1_41_53_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_41_53_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_41_53_Closed_Text.style.display='none'; Codehighlighter1_41_53_Open_Image.style.display='inline'; Codehighlighter1_41_53_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">enum</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN id=Codehighlighter1_41_53_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_41_53_Open_Text><SPAN style="COLOR: #000000">{ value </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> v }</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000">;</SPAN></DIV><BR>濡備笅錛?BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">template </SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">typename T, </SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN style="COLOR: #000000"> isPolimorphic</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000"> NiftyContainer<BR><IMG id=Codehighlighter1_63_325_Open_Image onclick="this.style.display='none'; Codehighlighter1_63_325_Open_Text.style.display='none'; Codehighlighter1_63_325_Closed_Image.style.display='inline'; Codehighlighter1_63_325_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_63_325_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_63_325_Closed_Text.style.display='none'; Codehighlighter1_63_325_Open_Image.style.display='inline'; Codehighlighter1_63_325_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN id=Codehighlighter1_63_325_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_63_325_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">:<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> DoSomething( T</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> pObj, Int2Type</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_119_152_Open_Image onclick="this.style.display='none'; Codehighlighter1_119_152_Open_Text.style.display='none'; Codehighlighter1_119_152_Closed_Image.style.display='inline'; Codehighlighter1_119_152_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_119_152_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_119_152_Closed_Text.style.display='none'; Codehighlighter1_119_152_Open_Image.style.display='inline'; Codehighlighter1_119_152_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_119_152_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_119_152_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        T</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> pNewObj </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> pObj</SPAN><SPAN style="COLOR: #000000">-></SPAN><SPAN style="COLOR: #000000">Clone();<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> DoSomething( T</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> pObj, Int2Type</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_200_233_Open_Image onclick="this.style.display='none'; Codehighlighter1_200_233_Open_Text.style.display='none'; Codehighlighter1_200_233_Closed_Image.style.display='inline'; Codehighlighter1_200_233_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_200_233_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_200_233_Closed_Text.style.display='none'; Codehighlighter1_200_233_Open_Image.style.display='inline'; Codehighlighter1_200_233_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_200_233_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_200_233_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        T </SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> pNewObj </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> T(</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">pObj);<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">:<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> DoSomething(T </SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000"> pObj)<BR><IMG id=Codehighlighter1_272_323_Open_Image onclick="this.style.display='none'; Codehighlighter1_272_323_Open_Text.style.display='none'; Codehighlighter1_272_323_Closed_Image.style.display='inline'; Codehighlighter1_272_323_Closed_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_272_323_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_272_323_Closed_Text.style.display='none'; Codehighlighter1_272_323_Open_Image.style.display='inline'; Codehighlighter1_272_323_Open_Text.style.display='inline';" src="http://m.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN id=Codehighlighter1_272_323_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://m.shnenglu.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_272_323_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/InBlock.gif" align=top>        DoSomething(pObj, Int2Type</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">isPolimorphic</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">());<BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000">;</SPAN></DIV><BR>濡傛灉娌℃湁榪欎釜 Int2Type錛屾槸涓嶅彲鑳藉疄鐜頒袱涓滈噸杞解濆嚱鏁?DoSomething( .. Int2Type<true>)鍜?DoSomething(...Int2Type<false>)鐨勶紝NiftyContainer鐨勫弬鏁?isPolimorphic鍙兘鍙杢rue鎴栬協alse錛屽疄闄呬笂緙栬瘧鍑烘潵鐨勮涔堟槸鍓嶄竴涓嚱鏁幫紝瑕佷箞鏄悗涓涓嚱鏁般?BR>濡傛灉娌℃湁榪欎釜Int2Type錛屾渶瀹規槗鎯沖埌鐨勫氨鏄儚涓嬮潰榪欐牱鍋氾細<BR><BR>if (isPolimorphic)<BR>{<BR>      T * pNewObj = pSomeObj->Clone();<BR>}<BR>else<BR>{<BR>       T * pNewObj = new T (*pSomeObj);<BR>}<BR><BR>濡傛灉澶氭佺畻娉曚嬌鐢?pObj->Clone(),閭d箞瀵逛簬浠諱綍涓涓湭鏇懼畾涔?Clone鍑芥暟錛堝嵆isPolimorphic==false錛夌殑綾繪潵璇達紝榪欓噷鐨勫墠涓涓垎鏀槸緙栬瘧澶辮觸鐨勩傚弽涔嬶紝濡傛灉 isPolimorphic == true錛屾槸涓嶆槸鍚庨潰閭d釜鍒嗘敮灝變繚璇佹病闂錛屼竴瀹氳兘閫氳繃鍛紵涓嶆槸鐨勶紝濡傛灉鏈変竴涓被璁捐鎴愪負鏈?Clone鍑芥暟錛屼絾鏄瀯閫犲嚱鏁版槸縐佹湁鐨勶紝灝變笉琛屽挴銆?BR><BR>鎵浠ワ紝 Int2Type鏄窡緙栬瘧鍣ㄨ錛氬樋錛屼笉瑕佸幓綆¢偅涓垜涓嶅叧蹇冪殑鍒嗘敮銆?<BR><BR>濡欏晩錛?img src ="http://m.shnenglu.com/tommy/aggbug/2996.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/tommy/" target="_blank">Tommy Liang</a> 2006-01-24 02:20 <a href="http://m.shnenglu.com/tommy/archive/2006/01/24/2996.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>璇諱功絎旇銆奀++璁捐鏂版濈淮銆?1) Template Template 鍙傛暟http://m.shnenglu.com/tommy/archive/2006/01/21/2951.htmlTommy LiangTommy LiangFri, 20 Jan 2006 20:39:00 GMThttp://m.shnenglu.com/tommy/archive/2006/01/21/2951.htmlhttp://m.shnenglu.com/tommy/comments/2951.htmlhttp://m.shnenglu.com/tommy/archive/2006/01/21/2951.html#Feedback2http://m.shnenglu.com/tommy/comments/commentRss/2951.htmlhttp://m.shnenglu.com/tommy/services/trackbacks/2951.html

template <class T>
struct OpNewCreator
{
    
static T* Create()
    
{
        
return new T;
    }

}
;
template 
<class T>
struct MallocCreator
{
    
static T* Create()
    
{
        
void * buf = std::malloc(sizeof(T));
        
if (! buf ) return 0;
        
return new(buf) T;
    }

}
;
template 
<class T>
struct PrototypeCreator
{
    PrototypeCreator(T
* pObj = 0) : pPrototype_(pObj)
    
{}
    T 
* Create()
    
{
        
return pPrototype_ ? pPrototype_->Clone() : 0;
    }

    T
* GetPrototype() return pPrototype_; }
    
void SetPrototype(T * pObj) { pPrototype_ = pObj; }
private:
    T
* pPrototype_;
}
;


class Widget
{
}
;


template 
<template <class Created> class CreationPolicy>
class WidgetManager : public CreationPolicy<Widget>
{
    
//
}
;



int _tmain(int argc, _TCHAR* argv[])
{
    typedef WidgetManager
< OpNewCreator >  myWidgetMgr;

    
return 0;
}


Tommy Liang 2006-01-21 04:39 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            亚洲激情在线观看视频免费| 欧美国内亚洲| 久久三级视频| 久久国产精品电影| 亚洲女优在线| 先锋影音网一区二区| 午夜伦欧美伦电影理论片| 欧美一级大片在线免费观看| 香蕉久久久久久久av网站| 亚洲欧美国产精品桃花| 欧美在线高清视频| 久久久精彩视频| 蜜臀久久99精品久久久画质超高清| 欧美不卡一区| 日韩视频免费在线| 午夜伦欧美伦电影理论片| 久久精品国产69国产精品亚洲| 久久综合九色综合网站| 欧美国产三区| 国产欧美综合在线| 亚洲盗摄视频| 亚洲欧美综合v| 欧美成人综合一区| 亚洲午夜激情网页| 欧美高清视频一区| 国产区亚洲区欧美区| 亚洲日本一区二区| 久久久精品国产免费观看同学| 欧美激情一区二区三区在线| 亚洲一区二区在线看| 一区二区日韩精品| 午夜精品久久久久久| 欧美大片免费看| 午夜精品福利一区二区蜜股av| 欧美aaa级| 国产欧美日韩精品丝袜高跟鞋| 亚洲日本久久| 欧美性色aⅴ视频一区日韩精品| 国产一区高清视频| 在线天堂一区av电影| 蜜桃精品久久久久久久免费影院| 欧美激情一区二区三区在线视频观看 | 亚洲综合清纯丝袜自拍| 久久精品国产一区二区三区免费看 | 久热精品视频在线观看一区| 国产精品久久久久久久久免费 | 亚洲第一精品电影| 午夜精品福利一区二区三区av| 欧美丰满少妇xxxbbb| 久久成人综合视频| 国产日韩av一区二区| 亚洲一区二区精品| 亚洲精品免费一二三区| 麻豆精品在线观看| 精品1区2区3区4区| 久久视频国产精品免费视频在线 | 亚洲欧美日韩成人| 国产精品a久久久久久| 在线一区二区日韩| 亚洲久久在线| 欧美日韩国产成人在线观看| 亚洲日韩欧美一区二区在线| 亚洲福利视频网站| 欧美电影在线免费观看网站| 91久久久久久国产精品| 欧美福利精品| 狂野欧美性猛交xxxx巴西| 亚洲第一网站| 欧美激情网友自拍| 欧美日本免费一区二区三区| 亚洲免费福利视频| 一区二区冒白浆视频| 国产精品va在线播放| 亚洲欧美日韩国产中文在线| 亚洲欧美大片| 好看的日韩视频| 欧美国产在线观看| 欧美日韩xxxxx| 亚洲女人天堂av| 亚洲淫片在线视频| 亚洲一区在线播放| 国产九色精品成人porny| 久久久久一区二区三区| 久久综合九色综合网站| 一区二区三区视频观看| 亚洲综合欧美| 免费亚洲电影在线| 亚洲一区观看| 欧美专区福利在线| 亚洲精品乱码久久久久久日本蜜臀| 亚洲人成在线观看一区二区 | 欧美美女福利视频| 欧美亚洲一区| 久久综合五月天婷婷伊人| 一区二区三区久久网| 性欧美暴力猛交69hd| 亚洲清纯自拍| 亚洲欧美综合| 亚洲精品一线二线三线无人区| 亚洲一区二区不卡免费| 亚洲黄色在线观看| 亚洲欧美在线网| 亚洲精品一区二区三区婷婷月| 亚洲在线中文字幕| 日韩亚洲精品电影| 久久大综合网| 欧美一级理论片| 欧美成人精品h版在线观看| 欧美在线观看天堂一区二区三区| 美女视频黄a大片欧美| 欧美中文字幕视频| 在线成人av.com| 欧美黄色一区| 久久久伊人欧美| 欧美色视频日本高清在线观看| 欧美一区在线视频| 欧美福利视频一区| 久久天堂精品| 国产日本亚洲高清| 日韩午夜黄色| 亚洲日本电影在线| 久久精视频免费在线久久完整在线看| 一区二区三区日韩精品| 蜜乳av另类精品一区二区| 久久欧美中文字幕| 国产综合自拍| 亚洲欧美日韩中文播放| 亚洲视频自拍偷拍| 欧美日韩大陆在线| 亚洲黄色片网站| 在线电影一区| 国产一区二区三区免费在线观看| 亚洲在线免费观看| 欧美精品色综合| 亚洲国产精品成人精品| 午夜精品视频网站| 欧美一区二区三区成人| 欧美三级视频在线| 一区二区久久久久| 一区二区三区欧美成人| 久久综合久久久久88| 在线高清一区| 久久人人九九| 免费亚洲电影在线观看| 亚洲国产成人精品女人久久久| 久久久久久久999精品视频| 久久午夜av| 亚洲欧洲日产国产网站| 欧美成人一区二区三区片免费| 欧美黑人在线播放| 亚洲精品久久嫩草网站秘色| 欧美日韩国产一区精品一区 | 久久亚洲综合色一区二区三区| 亚洲三级影院| 久久久中精品2020中文| 欧美不卡一区| 99国产精品自拍| 欧美区高清在线| 亚洲视频在线观看视频| 美女日韩欧美| 亚洲美女在线国产| 欧美专区在线| 91久久极品少妇xxxxⅹ软件| 欧美精品1区| 亚洲欧美在线磁力| 美女免费视频一区| 宅男在线国产精品| 国产有码一区二区| 免费h精品视频在线播放| 999亚洲国产精| 久久激情婷婷| 亚洲精品乱码久久久久久按摩观 | 亚洲精品美女| 欧美精品久久一区二区| 一区二区高清视频在线观看| 久久精品国产一区二区三区| 亚洲成在线观看| 欧美日韩在线观看一区二区| 午夜在线视频一区二区区别| 欧美xx69| 久久精品国产99| 日韩视频三区| 国产一区二区三区在线观看网站 | 欧美日本一道本| 亚欧成人精品| 日韩视频在线一区二区| 久久久精品欧美丰满| 亚洲网在线观看| 亚洲国产精品毛片| 国产日韩欧美综合一区| 亚洲欧美一区二区视频| 欧美日韩中文字幕在线视频| 欧美福利视频| 激情偷拍久久| 国产精品成人播放| 免费成人黄色av| 欧美在线在线| 亚洲天堂免费在线观看视频| 欧美激情中文字幕乱码免费| 久久久夜夜夜|