-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start implementations of <algorithm>, <array>, <iterator>, <utility> #95
Conversation
What's the reason for not using libc++? At least the freestanding parts should work without modification, shouldn't they? |
Do be aware that I'm planning to port libc++ itself at some point, and I'll end up replacing many of these functions with those I'm definitely not going to block any work along these lines though; who knows what I'll actually get around to, and a bird in the hand is worth two in the bush. It's also very likely that hand-written 6502-friendly versions of various functions will be superior to those in libc++; in those cases; I'll try to port any of the work over as an |
@@ -0,0 +1,57 @@ | |||
#pragma once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include guards rather than pragma once; here and throughout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly straight conservativism; the majority of C++ style guides disallow it. In particular, it's not allowed in the LLVM style guide, which we've been taking as a baseline (although I've been nowhere near as picky about naming etc.) It's also generally desirable to use standardized mechanisms over non-standard ones, unless there's a very compelling reason.
I wanted to check what it takes to implement the library looking at the C++ standard. Also, I guess that writing just the parts needed for |
…lvm-mos#95) * Add partial implementations of <algorithm>, <array>, <iterator>, <utility> See llvm-mos#52. * Avoid #pragma once.
This reduces the list of errors in #52 to:
To be continued.