《STL源码剖析》 -- stl_config.h

本文主要探讨了STL中的核心文件stl_config.h,详细阐述了其作用,以及文件内部的关键注释,帮助读者理解STL的基础构建。
摘要由CSDN通过智能技术生成

一、stl_config.h的作用

不同的编译器对C++语言的支持程度不同。而STL作为一个希望具备广泛移植能力的程序库,要支持不同的编译器。
所以STL准备了一个stl_config.h头文件,里面根据使用的不同编译器定义了许多常量,标志是否支持某些C++语言特性,
所有的STL头文件都会直接或间接的包含这个头文件,并以条件式写法,让预处理器根据各个常量决定取舍哪一段代码。

二、stl_config.h注释

/*
 *
 * Copyright (c) 1994
 * Hewlett-Packard Company
 *
 * Permission to use, copy, modify, distribute and sell this software
 * and its documentation for any purpose is hereby granted without fee,
 * provided that the above copyright notice appear in all copies and
 * that both that copyright notice and this permission notice appear
 * in supporting documentation.  Hewlett-Packard Company makes no
 * representations about the suitability of this software for any
 * purpose.  It is provided "as is" without express or implied warranty.
 *
 * Copyright (c) 1997
 * Silicon Graphics
 *
 * Permission to use, copy, modify, distribute and sell this software
 * and its documentation for any purpose is hereby granted without fee,
 * provided that the above copyright notice appear in all copies and
 * that both that copyright notice and this permission notice appear
 * in supporting documentation.  Silicon Graphics makes no
 * representations about the suitability of this software for any
 * purpose.  It is provided "as is&
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值