Skip to content

Use function call in Example of C.48: Prefer default member initializer#2330

Open
N-Dekker wants to merge 1 commit into
isocpp:masterfrom
N-Dekker:Use-function-call-in-C-48-Prefer-default-member-initializer
Open

Use function call in Example of C.48: Prefer default member initializer#2330
N-Dekker wants to merge 1 commit into
isocpp:masterfrom
N-Dekker:Use-function-call-in-C-48-Prefer-default-member-initializer

Conversation

@N-Dekker

@N-Dekker N-Dekker commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Guideline C.48 appears specifically about constant initializers, and its Example only had literal constants (666, "qqq", 0) as initializers.

However, the guideline also applies when initializing a member by a function-call, like numeric_limits<int>::min(). This commit adjusts the Example accordingly.

Guideline C.48 appears specifically about _constant_ initializers, and its Example only had literal constants (`666`, `"qqq"`, `0`) as initializers.

However, the guideline also applies when initializing a member by a function-call, like `numeric_limits<int>::min()`. This commit adjusts the Example accordingly.
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