Skip to content

Conversation

@practicalswift
Copy link
Contributor

Add note about our preference for scoped enumerations (enum class).

Context: #10742

@practicalswift practicalswift force-pushed the document-enum-class-preference branch from a5ea287 to 5cb262b Compare March 27, 2018 15:05
Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

Concept ACK

Copy link
Member

Choose a reason for hiding this comment

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

I had the impression it was possible to specify the type even for the "deprecated" enum.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MarcoFalke Ah, you're right. Forward declaration of enum:s was fixed in C++11. Will update!

Copy link
Member

Choose a reason for hiding this comment

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

It's ok, avoiding scope leak is the best argument for using scoped enums anyway.

@practicalswift practicalswift force-pushed the document-enum-class-preference branch from 5cb262b to 0fee2b4 Compare March 27, 2018 15:18
@maflcko
Copy link
Member

maflcko commented Mar 27, 2018

ACK 0fee2b4

@laanwj laanwj merged commit 0fee2b4 into bitcoin:master Mar 27, 2018
laanwj added a commit that referenced this pull request Mar 27, 2018
…ons ("enum class")

0fee2b4 doc: Add note about our preference for scoped enumerations ("enum class") (practicalswift)

Pull request description:

  Add note about our preference for scoped enumerations (`enum class`).

  Context: #10742

Tree-SHA512: 0ab3465c2b734240cb38a05c2f6e75f1af54207a0f1a2e8115e7b367fd37e8966a2fc0240c6d4c2c66b6677b5f367eda4f4b783bbaa419777336c17f04adff06
@laanwj
Copy link
Member

laanwj commented Mar 27, 2018

utACK 0fee2b4

PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 17, 2020
…umerations ("enum class")

0fee2b4 doc: Add note about our preference for scoped enumerations ("enum class") (practicalswift)

Pull request description:

  Add note about our preference for scoped enumerations (`enum class`).

  Context: bitcoin#10742

Tree-SHA512: 0ab3465c2b734240cb38a05c2f6e75f1af54207a0f1a2e8115e7b367fd37e8966a2fc0240c6d4c2c66b6677b5f367eda4f4b783bbaa419777336c17f04adff06
@practicalswift practicalswift deleted the document-enum-class-preference branch April 10, 2021 19:34
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants