-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
added color support for windows #102
Conversation
Thanks a lot for the PR. A few comments/requests if you don't mind:
|
Yeah no problem ! |
Thanks! This mostly looks good and my only concern now is the use of mutable global state ( |
As you like, In C++11 we could use std::call_once in this case for thread safety, right? |
Yeah, but the library should be compatible with pre-C++11 compilers. Thanks updating the PR. |
I've merged it with minor changes (7004d1e & 9368b6a). However, the |
The error in the test is coming from the codes below if(!GetConsoleScreenBufferInfo(handle, &infoCon))
FMT_THROW(GetLastError(), "cannot get console informations"); if(!SetConsoleTextAttribute(handle, color))
FMT_THROW(GetLastError(), "cannot set console color"); it seems like it always throws with gtest, but I've tested in a project and it works... |
Looks like the |
I've moved the Windows implementation of |
@Ryuuke, could you please review the updated CONTIBUTING document, particularly the part about licensing, and let me know if you agree with it being applied to your contributions to {fmt}? The library is likely to be relicensed (#1073) so I'm collecting approval from all earlier contributors. Thanks! |
Looks good to me ! |
No description provided.