Please consider bundling C++ STL with your application
Systems targeted by C++ toolchains vary a lot even though C++ constantly changes. If you rely on operating system STL for your application code, following things may happen:
- If your platform A supports C++20 and your platform B supports C++14 and your platform C supports C++11, you will either force C++ <= 11 to all your libraries, or use macro magic etc, to use one set of features each platform.
- If you operate in a specialized domain, such as real-time systems, you may need a standard library built with specific configuration options, such as disabling exceptions or RTTI. Relying on the system-provided STL leaves you dependent on how it was built, which may not meet your requirements
If you build your STL of choice you solve all these issues:
- You can use the highest C++ standard possible, you no longer have to think about each operating system state extensively.
- You can configure your STL to match your needs
In nearly all modern system languages you build standard library yourself, I don't see any reason why C++ developers shouldn't consider this.
https://redd.it/1x6zfqy
@r_cpp
Post #25858
2