STL VS standard library

本文探讨了gcc、clang和Visual C++等编译器使用的标准库实现之间的区别,强调了这些库虽然遵循相同的接口标准,但在二进制兼容性上存在差异。此外,文章还对比了STL的发展历史,从Alexander Stepanov的工作到C++标准库的形成,阐述了它们在技术上的差异。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Each compiler uses a different implementation.

For example, gcc uses libstdc++, clang uses either that or libc++ and Visual C++ uses a version based on theDinkumware implementation. All of these use the same interface (ie. if your code conforms to the standard, it should work and give the same results on all implementations), but they are usually not binary compatible (ie. astd::string from a shared library linked with libstdc++ will usually break when used by a VC++ executable).

The original STL was developed by Alexander Stepanov in the late 80s and early 90s, first at HP and later at SGI. The parts of the C++ standard library commonly referred today to as STL are based on that work, but they are technically different libraries.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值