⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.old

📁 C++ Standard Library, A Tutorial and Reference source code
💻 OLD
字号:
The present implementation reflects the version of the STL documentdated: August 18, 1994.It has many minor differences from the previous versions. The mostsignificant are:	- inclusion of reference types in the allocators and containers;	- inclusion of the reverse iterator type and rbegin(), rend()	  functions in the containers;	- inclusion of swap function in the containers;	- elimination of empty and restrictor throughout.To illustrate how to use allocators, several types of allocators andcontainers using them are included.The new version of STL has been compiled on:Borland 4.0EDGIBM xlCIBM C setIt would take an effort to port this code to a cfront basedcompilers (e.g. HP). We have no experience with G++. There are some cases on which any of these compilers do not compile STLcode, but it is usually corner cases. Moreover, on Borland, forexample, STL does not compile the same cases on which Borland's ownlibrary does not compile. We did not have time to put the ifdefs that will work around differentcompiler bugs. The code is "generic" with only some workarounds forthe Borland compiler in it.Users of Borland need to either comment out the definitions of min andmax in algobase.h or comment out Borland's min and max in stdlib.h.You might encounter the following compiler problems:1. functions that take const T & as an argument do not match argumentsof type T&. (Happens with max and min, for example.) The errormessages on Borland say "Illegal structure operation in ...". Threepossible workarounds are:	- replacing const T& with T&;	- replacing const T& with T;	- providing a manual instantiation of an offending function.2. Compiler matches templates incorrectly. That happens often ifdifferent memory models are used together. copy, for example, isinstantiated for int* and then the same instance is used for copy(int__huge *, ...). This bug is very hard to catch, because it is only runtime detectable. (Occasionally it might be indicated with a warning:"Suspicious pointer conversion".) 3. destroy does not work for your built-in type. (Most compilers havea variant of this one.) As a workaround, provide your own destroy forthe type. (We include many of them in defalloc.h)The only non-implemented parts of the STL as described in the documentare:1) Constructor templates and insert templates for containers takingtwo arbitrary iterators. They are simulated by a constructors takingpointers.2) Parameterization of containers with a template allocator issimulated with the help of cpp.3) Since bool is not yet implemented as a type on most compilers -vector<bool> is impemented as bit_vector.4) Default template arguments have to be always explicitly given.The total amount of code that would need to be re-written when thecorresponding features are supported is of the order of 20 lines.We intend to keep improving the implementation.  Therefore, we wouldappreciate your comments and algorithmic bug reports.  Please send themto:stepanov@mti.sgi.comor to:lee@hpl.hp. comor to:musser@cs.rpi.eduPlease do not send us reports of compiler bugs.  Report them to yourcompiler vendors.The following files are included:algo.h - includes all the algorithmsalgobase.h - auxiliary filebool.h - simulates boolbvector.h - bit_vectordefalloc.h - allocatordeque.h - dequedoc.bar.ps - postscript of the document with change bars from the previous 	version of the documentdoc.ps - postscript of the documentdoc.mif - framemaker's Maker Interchange Format of the documentfaralloc.h - far_allocator fdeque.h - far_dequeflist.h - far_listfmap.h - far_mapfmultmap.h - far_multimapfmultset.h - far_multisetfset.h - far_setfunction.h - operators, function objects and function adaptorshdeque.h - huge_dequeheap.h - auxiliary filehlist.h - huge_listhmap.h - huge_maphmultmap.h - huge_multimaphmultset.h - huge_multisethset.h - huge_sethugalloc.h - huge_allocatorhvector.h - huge_vectoriterator.h - iterator tags, stream iterators and iterator adaptorslbvector.h - long_bit_vectorldeque.h - long_dequelist.h - listllist.h - long_listlmap.h - long_maplmultmap.h - long_multimaplmultset.h - long_multisetlngalloc.h - long_allocatorlset.h - long_setmap.h - mapmultimap.h - multimapmultiset.h - multisetneralloc.h - near_allocatornmap.h - near_mapnmultmap.h - near_multimapnmultset.h - near_multisetnset.h - near_setpair.h - pairprojectn.h - auxiliary filerandom.cpp - random number generator. It should be compiled and 	linked if random_shuffle is used.set.h - setstack.h - container adaptorstempbuf.cpp - an auxiliary buffer for get_temporary_buffer; it should be 	compiled and linked if get_temporary_buffer, stable_partition,	inplace_merge or stable_sort are used.tempbuf.h - get_temporary_buffertree.h - auxiliary filevector.h - vector

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -