当前位置:   article > 正文

如何获取 C++ 标准库的源码_c++ 标准库 源码

c++ 标准库 源码

获取 C++ 标准库主要有两种途径: 从 C++ 编译器的安装位置(Your C++ compiler installation location)和直接查看或下载网上开源代码(Online open source codes). 具体如下:

C++编译器的安装位置(Your C++ compiler installation location)

Windows OS

Visual Studio — X:\Microsoft Visual Studio 9.0\VC\crt\src; X:\Program files (x86)\Microsoft Visual Studio 14.0\VC\include\; X:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\crt\src

D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtree
Note,
1) You even don't have to install Visual Studio to explore Microsoft implementation. Online compilers can help: rextester.com/NRP17506
2) In Visual Studio if you interesting in concrete(specific) STL-element implementation (for example, any function), right click on its mention in your code and chose "Go to Definition" in context menu. (Or place cursor on this mention and push "F12")

Linux/Unix

gcc — /usr/include/c++/; /usr/lib/gcc/CTARGET/

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/在线问答5/article/detail/999872
推荐阅读
相关标签