r/cpp
•
u/tartaruga232
MSVC user, r/cpp_modules
•
Dec 01 '25
•
1
Standard Library implementer explains why they can't include source code licensed under the MIT license
/r/cpp/comments/1p9zl23/comment/nrgufkd/Some (generous!) publishers of C++ source code intended to be used by others seem to be often using the (very permissive) MIT license. Providing a permissive license is a great move.
The MIT license however makes it impossible to include such source code in prominent C++ Standard Library implementations (and other works), which is a pity.
The reason for this is the attribution clause of the MIT license:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
This clause forces users of the sources to display attribution even to end users of a product, which is for example exclusively distributed in binary form.
For example, the Boost License explicitly makes an exception for products which are shipped exclusively in binary form ("machine-executable object code generated by a source language processor"):
The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.
If you want your published source code to be compatible with projects that require such an exception, please consider using a license which allows such an exception (e.g. the Boost license). Copies in source form still require full attribution.
I think such an exception for binaries is a small difference which opens up lots of opportunities in return.
(Disclaimer: This is no legal advice and I'm not a lawyer)
Thank you.
View all comments
Show parent comment
6
u/aruisdante Dec 01 '25
I mean, this is something I have to deal with right now (I work in automotive). It’s horrible, the only thing people agree on (roughly) is spdx as a format for interchange. There are good people trying to make it a thing, like this discussion on making it first party in bazel, but it’s still pretty Wild West out there. And the industries you’ve listed, with the exception of maybe finance, aren’t renowned for being on the cutting edge of software development. Safety standards compliant automotive for example only just got C++17 last year, and it will likely be at least another several years before we’re allowed to actually use it because of the high water issue (for a dependency to migrate, all its dependents have to migrate first). Non of my friends who work outside the automotive space have even heard of an SBOM in the formal sense of that word. It’s still quite niche in the scale of all software development that happens out there.
I think there are a lot of issues that will need to be solved first before a standard library is willing to rely on SBOM distribution as their legal defense for compliance with a cascading-attribution OSS license.