This article discuss the question of whether a "hello world" program is protected by copyright. It comes to the conclusions that it is not (under US copyright law) because most of it is required by the implementation leaving only the phrase "hello, world" which by itself is too trivial to be copyrightable.
I believe the same reasoning would apply for my jurisdiction which is the UK.
Could this reasoning also apply to implementation of a relative pointer type in C++, of which the offset_ptr from boost is perhaps the most well known example.
I believe this should not be covered by copyright but would like to hear the wisdom of the internet. My reasoning is as follows:
originality does not apply because:
- A relative pointer is well known concept
- There are existing open source implementations available
There is only one way to do this properly because, the C++ standard requires a useful offset pointer implementation to implement:
- pointer traits
- iterator traits
- and an allocator supporting the pointer for it to be useful with STL types like std::vector
While more much complex than the requirements for "#include <stdio.h>" or "main()" in a C hello world program the logic seems the same to me. How you write such a thing is entailed by the language specification.
My motivation is I would like to post an answer to my own question.
I created a solution at work so the copyright rests with my employer. The correct thing to do is get permission from them before publishing. However, my employer currently does not have an open source policy. I am trying to engage with them over this but it could take some time and my never happen. However I believe this piece of code is trivial so it ought to be a courtesy or a matter of being ethically correct rather than being a legal requirement.
Preferably I would like to publish it as a living project with a unit test suite and build system. If it is trivial I am unclear if this would enough to render it non-trivial. For example, the tests are entailed by the functionality I am trying to test though my choice of test framework is not. Likewise adding a trivial build system.
I have asked the general question separately as - At what point does something become non trivial so that copyright applies? The general question may be hard to answer definitively so this question covers a specific case.
Related questions:
- How can I determine if some code I want to release as opensource is already licensed or proprietary?
- What is defined as trivial code when licensing a project
- https://workplace.stackexchange.com/questions/129053/can-i-adapt-code-i-wrote-for-work-and-release-it-as-open-source
- Legality of publishing code for a stackoverflow answer as an example impementation