-
Notifications
You must be signed in to change notification settings - Fork 24
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
Improve display of bools #45
Improve display of bools #45
Conversation
Thank you very much! I acknowledge the issue. However, I have to check if I like this solution (I think those C++ I/O manipulators have an ugly and slightly mystical touch). Moreover, I would like to see a test case for this scenario. |
I still have not found consensus with myself. Hence I somehow tend to prefer the template specialization solution, like (edit note: totally untested) template<>
struct Stringizer<bool>
{
static std::string ToString(bool value)
{
return value ? "true" : "false";
}
}; although it is much more code. |
There's a third point (first was test cases, second the question whether template specialization is possibly "better" than boolalpha): the commit message. (GitHub does not allow to comment on commit messages directly.) Sorry for the nitpicking here. But I feel it is often forgotten that commit messages are also "first-class citizens" of a repository, not only the code itself.
|
I updated the commit message.
IIUC Or, how about specializing |
Thank you.
That's right, but it still feels wrong in some way... (Does it, really? 🤔🤔🤔)
Yes, thanks! I was too lazy looking up its name :) I think that's the way I'd prefer it. |
|
Lovely, thank you very much! Will you write test cases or do I have to? :) PS: I wonder why the GitHub Actions for "push" are not triggered. |
I would appreciate if you write it.
|
Ok, thanks for your work!
Thanks for adding. But what I mean is this: you have pushed to e-kwsm/snowhouse but your push has not triggered the action. 🤔 edit: Your last push triggered the action, but your previous pushes did not. Weird. |
First I activated (required?) GitHub Actions on my fork and forcely pushed c765187 to check it, and GitHub actions were triggered (I hope this link is accessible). I'm not sure why but it seems that other people cannot access to https://github.com/e-kwsm/snowhouse/actions. Actually it is possible to access via history. 😕 |
Ah, so you had to activate GitHub Actions on your fork. I did not know that this is necessary; this explains my confusion. Thank you for shedding light on this. I originally thought that this is always activated, and that's why I did not initially use
It is. |
Consider the following example:
Obviously the tests fail but messages are:
true
andfalse
are respectively printed as1
and0
.To fix this,
std::boolalpha
is added.