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

make Either constexpr if possible #3

Open
nikhedonia opened this issue May 22, 2017 · 0 comments
Open

make Either constexpr if possible #3

nikhedonia opened this issue May 22, 2017 · 0 comments

Comments

@nikhedonia
Copy link
Contributor

Currently either is never constexpr because it implements a destructor.
This is needed in the generic case as the types for left or right might have a custom destructor.
Using type_traits we can test if this is the case and make Either a literal type(constexpr) if we deal with pods only.

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

No branches or pull requests

1 participant