// (3) Defines __STL_STATIC_TEMPLATE_MEMBER_BUG if the compiler can't // handle static members of template classes. 没有这个bug // (5) Defines __STL_CLASS_PARTIAL_SPECIALIZATION if the compiler // supports partial specialization of class templates. // (6) Defines __STL_FUNCTION_TMPL_P...
ALLOC_H #define__SGI_STL_INTERNAL_ALLOC_H #ifdef__SUNPRO_CC #define__PRIVATEpublic //Extraaccessrestrictionspreventusfromreallymakingsomethings //private. #else #define__PRIVATEprivate #endif #ifdef__STL_STATIC_TEMPLATE_MEMBER_BUG #define__USE_MALLOC #endif //本檔實作出某些標準的nodeallocators...
侯捷stl源码剖析注释之33 sgi-stl-list
侯捷stl源码剖析注释之51-sgi-stl-set.pdf,stl_set.h 完整列表 1 G++ 2.91.57 ,cygnus\cygwin-b20\include\g++\stl_set.h 完整列表 /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and i
inline void basic_string <charT, traits, Allocator>::Rep:: operator delete(void * ptr) { Allocator::deallocate(ptr, sizeof(Rep) + reinterpret_cast<Rep *>(ptr)->res * sizeof (charT)); } template <class charT, class traits, class Allocator> inline size_t basic_string <charT, traits,...
()) 2.1 空间配置器的标准接口 2.1.1 设计一个简单的空间配置器,JJ::allocator 2.2 具备次配置力(sub-allocation)的SGI空间配置器 2.2.1 SGI标准的空间配置器,std::allocator 2.2.2 SGI特殊的空间配置器,std::alloc 2.2.3 构造和析构基本工具:construct()和destroy() 2.2.4 空间的配置与释放,std::alloc...
/* NOTE: This is an internal header file, included by other STL headers. * You should not attempt to use it directly.*/ #ifndef __SGI_STL_INTERNAL_TEMPBUF_H #define __SGI_STL_INTERNAL_TEMPBUF_H __STL_BEGIN_NAMESPACE template <class T> pair<T*, ptrdiff_t> get_temporary_...
#ifndef __SGI_STL_INTERNAL_FUNCTION_H #define __SGI_STL_INTERNAL_FUNCTION_H __STL_BEGIN_NAMESPACE // C++ Standard 規定,每一個 Adaptable Unary Function 都必須繼承此類別 template <class Arg, class Result> struct unary_function { typedef Arg argument_type ;typedef Result result_type ;};...
#define __SGI_STL_INTERNAL_PAIR_H __STL_BEGIN_NAMESPACE template <class T1, class T2> struct pair { typedef T1 first_type ;typedef T2 second_type ; T1 first ; // 注意,它是 public T2 second ; // 注意,它是 public pair() : first(T1()), second(T2()) {} pair(const T1...