Skip to content

STYLE: Make NumericTraits::GetLength constexpr whenever possible#5671

Merged
hjmjohnson merged 1 commit into
InsightSoftwareConsortium:mainfrom
N-Dekker:GetLength-constexpr
Dec 4, 2025
Merged

STYLE: Make NumericTraits::GetLength constexpr whenever possible#5671
hjmjohnson merged 1 commit into
InsightSoftwareConsortium:mainfrom
N-Dekker:GetLength-constexpr

Conversation

@N-Dekker

@N-Dekker N-Dekker commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

It appears that most NumericTraits specializations can have constexpr GetLength member functions. The only NumericTraits specializations whose GetLength member functions cannot be constexpr are for std::vector and VariableLengthVector


It appears that most `NumericTraits` specializations can have constexpr
`GetLength` member functions. The only `NumericTraits` specializations
whose `GetLength` member functions cannot be constexpr are for `std::vector`
and `VariableLengthVector`
@github-actions github-actions Bot added area:Core Issues affecting the Core module type:Style Style changes: no logic impact (indentation, comments, naming) labels Dec 4, 2025
@N-Dekker N-Dekker marked this pull request as ready for review December 4, 2025 15:17
@hjmjohnson hjmjohnson merged commit 0fa82fb into InsightSoftwareConsortium:main Dec 4, 2025
17 checks passed
hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request May 6, 2026
…ngth-constexpr

STYLE: Make `NumericTraits::GetLength` constexpr whenever possible
hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request May 12, 2026
…ngth-constexpr

STYLE: Make `NumericTraits::GetLength` constexpr whenever possible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module type:Style Style changes: no logic impact (indentation, comments, naming)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants