Skip to content

[linux-port] Avoid using enum class as set key - #1288

Merged
Ehsan (ehsannas) merged 1 commit into
microsoft:masterfrom
ehsannas:enum_set
May 16, 2018
Merged

Ehsan (ehsannas) merged 1 commit into
microsoft:masterfrom
ehsannas:enum_set

Conversation

@ehsannas

Copy link
Copy Markdown
Contributor

Using an enum class as the key of an unordered_set is supported starting
C++14.

The two possible solutions are: a) provide a hash function b) cast to
unsigned. Given the usage here, it latter is a simpler fix.

Using an enum class as the key of an unordered_set is supported starting
C++14.

The two possible solutions are: a) provide a hash function b) cast to
unsigned. Given the usage here, it latter is a simpler fix.
@AppVeyorBot

Copy link
Copy Markdown

@ehsannas Ehsan (ehsannas) changed the title [linux-port] Avoid using enum class as set key. (#178) [linux-port] Avoid using enum class as set key May 16, 2018
@hekota Helena Kotas (hekota) added the linux Linux-specific work label May 16, 2018

@hekota Helena Kotas (hekota) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@ehsannas

Copy link
Copy Markdown
Contributor Author

Thanks, Helena Kotas (@hekota)

@ehsannas
Ehsan (ehsannas) merged commit e6d169d into microsoft:master May 16, 2018
@ehsannas
Ehsan (ehsannas) deleted the enum_set branch May 16, 2018 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linux Linux-specific work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants