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

[Hashable] hana::integral_constant with an enum value implements Hashable #440

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Dwarfobserver
Copy link

Hi, this is my first contribution to Boost.Hana, so please tell me my mistakes :)

This small change implements Hashable for hana::integral_constant with an enumeration value :
It allows for example to use enumeration values as key for hana::map.

@ricejasonf
Copy link
Collaborator

ricejasonf commented Feb 21, 2019

I think CI failed because it found trailing spaces. The github site doesn't seem to reflect that though.

$ LANG=POSIX grep '[[:blank:]]$' "${sources[@]}"; [[ $? == 1 ]] || exit 1 is the last command ran in the log but with no error message.

@Dwarfobserver
Copy link
Author

Indeed, good catch ! I corrected them.

@ricejasonf
Copy link
Collaborator

lgtm, but please "fixup" the commit so there is one commit.

@ldionne is currently at a standards committee meeting, so I don't know when he will look at this.

@Dwarfobserver Dwarfobserver force-pushed the feature/hashable-integral-constant-enums branch from 864e975 to 64a9a40 Compare February 23, 2019 10:51
@Dwarfobserver
Copy link
Author

Sorry, I thought it was only for local commits ! Done :)

@vyzaq
Copy link

vyzaq commented Jun 17, 2020

Do you have any progress on that PR?

@ReiserFlorian
Copy link

I would like to have this feature, too

> {
template <typename X>
static constexpr auto apply(X const&) {
return hana::type_c<X>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just taking a second look at this, is there a reason it does not normalize to hana::type<hana::integral_constant<T, X::value> as the others do?

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.

4 participants