libposix icon indicating copy to clipboard operation
libposix copied to clipboard

posix namespace is reserved

Open Rapptz opened this issue 10 years ago • 8 comments

According to the C++ standard, the posix namespace is reserved for future use and thus its use is illegal.

Section in C++11 standard:

§17.6.4.2.2 [namespace.posix]

The behavior of a C++ program is undefined if it adds declarations or definitions to namespace posix or to a namespace within namespace posix unless otherwise specified. The namespace posix is reserved for use by ISO/IEC 9945 and other POSIX standards.

Rapptz avatar Jun 16 '15 10:06 Rapptz

Thanks. We are indeed aware of the issue, and that's the primary reason we aren't promoting this project beyond its existing user base where the matter is of little concern (since compilers don't enforce §17.6.4.2.2, at present).

artob avatar Jun 16 '15 14:06 artob

I don't get this impression from the readme/welcome page at all:

100% free and unencumbered public domain software

Compatible with Clang and GCC, or any standard C++11 implementation.

usable in any context and for any purpose.

I'd say usage outside a closed group is promoted.

sehe avatar Jun 16 '15 17:06 sehe

You'd have to find your way to the README first. Based on the number of people who've starred the project over the past few years it's been up here, that doesn't happen very often. (Where did you guys come from, all of a sudden?)

But if it makes someone feel better, we will go ahead and add a warning about §17.6.4.2.2 to the README.

artob avatar Jun 16 '15 17:06 artob

I appreciate you being open. I can see the surprise. Then again, it's a public project and you made that readme with a purpose :) So, I assumed visitors are welcome.

I'm active on stackoverflow and the project was linked in a chat thread.

Remember that if people come to talk to you about your project it means they care enough. I don't think we're trying to annoy you :)

Do you prefer I make pull-requests instead of just "dropping" ideas?

sehe avatar Jun 16 '15 17:06 sehe

I've gone ahead and added a prominent "Caveats" section to the README just now.

@sehe The README is based on a template common to all the projects around this corner of GitHub. The intent was originally to publish this project on SourceForge and elsewhere, as it certainly fills a niche of sorts and could be of use to many folks--especially given its public-domain licensing--but noticing §17.6.4.2.2 rather unmotivated me to pursue that plan of action.

The project namespace probably does need to get renamed at some point, but it hasn't been a pressing issue (no compiler complains as yet) and it'd be a nasty bit of breakage to the library and the existing set of programs that use it, so it simply hasn't become a priority given no external users as yet.

I welcome pull requests, of course, but something of the magnitude of changing the project namespace merits a discussion and plan before anyone starts changing hundreds of lines of existing code.

artob avatar Jun 16 '15 17:06 artob

That's what we were doing here, until the plan was closed :) Anyhoops. Thanks for the library. I will look at it over the coming period of time.

Cheers

sehe avatar Jun 16 '15 17:06 sehe

OK, issue now reopened for continued collaborative input on the matter--and thanks for your interest.

artob avatar Jun 16 '15 17:06 artob

Maybe it is worth to actually go ahead and rename the namespace?

intelfx avatar Jun 04 '16 13:06 intelfx