InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.37k stars 660 forks source link

STYLE: Prefer c++17 [[maybe_unused]] attribute over (void) #4581

Closed hjmjohnson closed 1 month ago

hjmjohnson commented 2 months ago

The use of (void)varname was a mechanism to silence compiler warnings prior to universal language support in c++17 for the [[maybe_unused]] attribute specifier.

PR Checklist

hjmjohnson commented 2 months ago

@thewtex -- This PR is getting old, and is one that will likely have merge-conflicts. Is this one that can be merged at this point?

hjmjohnson commented 2 months ago

@blowekamp I'll wait until next month after the release. Hopefully, there won't be too many merge conflicts.

hjmjohnson commented 2 months ago

Making a draft until until after 5.4 release is complete.

thewtex commented 2 months ago

Thank you for saving this improvement for after v5.4.0 :+1:

seanm commented 2 months ago

Isn't [[maybe_unused]] C++17, not C++11?

thewtex commented 1 month ago

@hjmjohnson v5.4.0 has been tagged -- please merge when you see fit.

hjmjohnson commented 1 month ago

Isn't [[maybe_unused]] C++17, not C++11?

Updated comments.