Skip to content

Avoid class template argument deduction (CTAD) to fix warnings#192

Merged
nciric merged 1 commit into
unicode-org:mainfrom
nciric:fix-ctad-warnings
May 19, 2026
Merged

Avoid class template argument deduction (CTAD) to fix warnings#192
nciric merged 1 commit into
unicode-org:mainfrom
nciric:fix-ctad-warnings

Conversation

@nciric
Copy link
Copy Markdown
Contributor

@nciric nciric commented May 19, 2026

Description
This PR avoids using Class Template Argument Deduction (CTAD) for inflection::util::Finally and inflection::dictionary::metadata::MarisaTrie by explicitly specifying template arguments or using decltype for lambdas.

Motivation
In some environments (e.g. with strict warning flags like -Wctad-maybe-unsupported enabled), using CTAD without explicit deduction guides can trigger compiler warnings or errors.

Instead of adding deduction guides to the headers, this PR changes the local invocations to avoid deduction entirely, making the code more robust across different compiler configurations and avoiding the need for deduction guides.

Copy link
Copy Markdown
Member

@grhoten grhoten left a comment

Choose a reason for hiding this comment

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

Definitely falls into the pedantic category.

@nciric
Copy link
Copy Markdown
Contributor Author

nciric commented May 19, 2026

Definitely falls into the pedantic category.

Let's just say that all warnings are converted to errors in some places, pedantic or not :).

@nciric nciric merged commit 9436c9a into unicode-org:main May 19, 2026
8 checks passed
@nciric nciric deleted the fix-ctad-warnings branch May 19, 2026 19:38
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.

2 participants