参考文稿详解ygwin-b20 include sgi stl hash fun.pdfVIP

  • 0
  • 0
  • 约3.02千字
  • 约 2页
  • 2025-06-06 发布于四川
  • 举报

参考文稿详解ygwin-b20 include sgi stl hash fun.pdf

G++2.91.57,cygnus\cygwin-b20\include\g++\stl_hash_fun.h完整列表

/*

*Copyright(c)1996

*SiliconGraphicsComputerSystems,Inc.

*

*Permissiontouse,copy,modify,distributeandsellthissoftware

*anditsdocumentationforanypurposeisherebygrantedwithoutfee,

*providedthattheabovecopyrightnoticeappearinallcopiesand

*thatboththatcopyrightnoticeandthispermissionnoticeappear

*insupportingdocumentation.SiliconGraphicsmakesno

*representationsaboutthesuitabilityofthissoftwareforany

*purpose.Itisprovidedasiswithoutexpressorimpliedwarranty.

*

*

*Copyright(c)1994

*Hewlett-PackardCompany

*

*Permissiontouse,copy,modify,distributeandsellthissoftware

*anditsdocumentationforanypurposeisherebygrantedwithoutfee,

*providedthattheabovecopyrightnoticeappearinallcopiesand

*thatboththatcopyrightnoticeandthispermissionnoticeappear

*insupportingdocumentation.Hewlett-PackardCompanymakesno

*representationsaboutthesuitabilityofthissoftwareforany

*purpose.Itisprovidedasiswithoutexpressorimpliedwarranty.

*

*/

/*NOTE:Thisisaninternalheaderfile,includedbyotherSTLheaders.

*Youshouldnotattempttouseitdirectly.

*/

#ifndef__SGI_STL_HASH_FUN_H

#define__SGI_STL_HASH_FUN_H

#includestddef.h

__STL_BEGIN_NAMESPACE

templateclassKeystructhash{};

inlinesize_t__stl_hash_string(constchar*s)

{

unsignedlongh=0;

for(;*s;++s)

h=5*h+*s;

returnsize_t(h);

}

__STL_TEMPLATE_NULLstructhashchar*

{

size_toperator()(constchar*s)const{return__stl_hash_string(s);}

};

__STL_TEMPLATE_NULLstructhashconstchar*

{

size_toperator()(constchar*s)const{return__stl_hash_string(s);}

};

__STL_TEMPLATE_NULLstructhashchar{

size_toperator()(charx)cons

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档