Skip to content

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

Merged
cubbimew merged 1 commit into
isocpp:masterfrom
N-Dekker:Use-function-call-in-C-48-Prefer-default-member-initializer
Aug 6, 2026
Merged

Use function call in Example of C.48: Prefer default member initializer#2330
cubbimew merged 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.
@cubbimew
cubbimew merged commit b057f29 into isocpp:master Aug 6, 2026
1 check passed
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.

5 participants