PeterSommerlad / SC22WG21_Papers

My submissions to SC22WG21 C++ ISO/IEC standardization group
43 stars 13 forks source link

Open-source license? #11

Open jgcodes2020 opened 3 years ago

jgcodes2020 commented 3 years ago

I'm looking to use the implementation of spanstream in my library.

PeterSommerlad commented 3 years ago

The example code showing implementability of spanstream was never meant to be production ready. as it is based on libstdc++ implementation of stringstream, it comes with libstdc++ GNU license. however, why do you want to use it and for what purpose?

jgcodes2020 commented 3 years ago

As of now, no library implements std::spanstream, and I'm planning to use it as a means to read embedded resources (in the form of a big array) as a file.

PeterSommerlad commented 3 years ago

If you are using gcc I do not see a major problem with that, since as a derived work my spanstream implementation "inherits" libstdc++'s GPL. But there may be other (non C++ compiler) libraries implementing spanstream, but I do not know. At least Microsoft has a spanstream implementation in a development branch.

But I am far from a legal expert, so if this is for commercial production code it might get someone into problems.

OTOH, I think I am expert enough to provide a licensed implementation completely done by myself for your compiler for a fee compensating my time, if that is a real need, but you can also DIY, if that is cheaper for you if licensing might be an issue. The specification is public :-)