侯捷stl源码剖析注释之25 sgi-stl-queue.pdf
上传人:qw****27 上传时间:2024-09-12 格式:PDF 页数:4 大小:1.8MB 金币:15 举报 版权申诉
预览加载中,请您耐心等待几秒...

侯捷stl源码剖析注释之25 sgi-stl-queue.pdf

侯捷stl源码剖析注释之25sgi-stl-queue.pdf

预览

在线预览结束,喜欢就下载吧,查找使用更方便

15 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

<stl_queue.h>完整列表1G++2.91.57,cygnus\cygwin-b20\include\g++\stl_queue.h完整列表/***Copyright(c)1994*Hewlett-PackardCompany**Permissiontouse,copy,modify,distributeandsellthissoftware*anditsdocumentationforanypurposeisherebygrantedwithoutfee,*providedthattheabovecopyrightnoticeappearinallcopiesand*thatboththatcopyrightnoticeandthispermissionnoticeappear*insupportingdocumentation.Hewlett-PackardCompanymakesno*representationsaboutthesuitabilityofthissoftwareforany*purpose.Itisprovided"asis"withoutexpressorimpliedwarranty.***Copyright(c)1996,1997*SiliconGraphicsComputerSystems,Inc.**Permissiontouse,copy,modify,distributeandsellthissoftware*anditsdocumentationforanypurposeisherebygrantedwithoutfee,*providedthattheabovecopyrightnoticeappearinallcopiesand*thatboththatcopyrightnoticeandthispermissionnoticeappear*insupportingdocumentation.SiliconGraphicsmakesno*representationsaboutthesuitabilityofthissoftwareforany*purpose.Itisprovided"asis"withoutexpressorimpliedwarranty.*//*NOTE:Thisisaninternalheaderfile,includedbyotherSTLheaders.*Youshouldnotattempttouseitdirectly.*/#ifndef__SGI_STL_INTERNAL_QUEUE_H#define__SGI_STL_INTERNAL_QUEUE_H__STL_BEGIN_NAMESPACE#ifndef__STL_LIMITED_DEFAULT_TEMPLATEStemplate<classT,classSequence=deque<T>>#elsetemplate<classT,classSequence>#endifclassqueue{friendbooloperator==__STL_NULL_TMPL_ARGS(constqueue&x,constqueue&y);friendbooloperator<__STL_NULL_TMPL_ARGS(constqueue&x,constqueue&y);public:typedeftypenameSequence::value_typevalue_type;typedeftypenameSequence::size_typesize_type;typedeftypenameSequence::referencereference;typedeftypenameSequence::const_referenceconst_reference;TheAnnotatedSTLSources2<stl_queue.h>完整列表protected:Sequencec;//底層容器public://以下完全利用Sequencec的操作,完成queue的操作。boolempty()const{returnc.empty();}size_typesize()const{returnc.size();}referencefront(){returnc.front();}const_referencefront()const{returnc.front();}referenceback(){returnc.back();}const_referenceback()const{r