Skip to content
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

Work around gcc warning about [[noreturn]] main() #50

Merged
merged 1 commit into from
Jan 5, 2017

Conversation

z33ky
Copy link
Collaborator

@z33ky z33ky commented Jan 4, 2017

No description provided.

@Quaker762 Quaker762 merged commit 686050a into Palm-Studios:master Jan 5, 2017
@z33ky
Copy link
Collaborator Author

z33ky commented Jan 5, 2017

enum class is not implicitly castable to int, so we'd have to use return static_cast<int>(exit_code::SUCCESS);, which is a handful. I'm open to it though, especially because we don't need to write it often. We could maybe also define a short-hand, like exit_cast, though it doesn't save much.

Destructors not running could be bad. We could also switch to a plain enum, but we'd loose the scoping, which I'm quite fond of. We could work around it with a non-constructible struct or namespace with constexpr members. Anyways, discussion in #53.

@z33ky z33ky deleted the gcc-noreturn-main branch January 5, 2017 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants