参考侯捷《STL源码剖析》
#ifndef __STL_CONFIG_H
# define __STL_CONFIG_H
// 本文件所做的事情:
// (1) 如果编译器没有定义 bool,true,false,就定义它们
// (2) 如果编译器的标准程序库未支持 drand48() 函数,就定义 __STL_NO_DRAND48
// (3) 如果编译器无法处理 static member of template classes(模板类的静态成员),就定义 __STL_STATIC_TEMPLATE_MEMBER_BUG
// (4) 如果编译器未支持关键词 typename,就将‘typename’定义为一个 null macro(空的宏).
// (5) 如果编译器支持 partial specialization of class templates(模板类的部分特化),
// 就定义 __STL_CLASS_PARTIAL_SPECIALIZATION.
// (6) 如果编译器支持 partial ordering of function templates (亦称为 partial specialization of function templates),
// 就定义 __STL_FUNCTION_TMPL_PARTIAL_ORDER
// (7) 如果编译器允许我们在调用一个 function template 时可以明白指定其 template arguments,
// 就定义__STL_EXPLICIT_FUNCTION_TMPL_ARGS
// (8) 如果编译器支持 template members of classes,就定义 __STL_MEMBER_TEMPLATES
// (9) 如果编译器不支持关键词 explicit ,就定义 ‘explicit’为一个 null macro.
// (10) 如果编译器无法根据前一个 template parameters 设定下一个 template parameters 的默认值,
// 就定义 __STL_LIMITED_DEFAULT_TEMPLATES
// (11) 如果编译器针对 non-type template parameters 执行 function template 的参数推导(argument deduction)时有问题,
// 就定义 __STL_NON_TYPE_TMPL_PARAM_BUG
// (12) 如果编译器无法支持迭代器的 operator->,就定义 __SGI_STL_NO_ARROW_OPERATOR
// (13) 如果编译器(在你所选择的模式中)支持 exceptions,就定义 __STL_USE_EXCEPTION
《STL源码剖析》—— stl_config.h
最新推荐文章于 2021-08-06 11:31:59 发布