Skip to content

Distinct types check#15

Merged
bobozaur merged 5 commits into
mainfrom
type_list_checks
May 23, 2025
Merged

Distinct types check#15
bobozaur merged 5 commits into
mainfrom
type_list_checks

Conversation

@bobozaur

Copy link
Copy Markdown
Owner

Wraps up the issue reported in #13 and partially addressed in #14. Another requirement to enforce should be that there are at least two distinct types in the type list. This ensures there's some valid conversion path to be taken and avoids infinite recursion.

This PR achieves that by checking that the first and last types in the list are distinct. This is sufficient since the derived type must have a direct conversion to one of them already and the macro generates the conversion to the other one, so having them equal makes no sense.

@bobozaur bobozaur self-assigned this May 23, 2025
@bobozaur bobozaur force-pushed the type_list_checks branch from 9abf451 to 1ccbf85 Compare May 23, 2025 12:16
@bobozaur bobozaur merged commit 1257a8c into main May 23, 2025
3 checks passed
@bobozaur bobozaur deleted the type_list_checks branch May 23, 2025 12:33
@bobozaur bobozaur changed the title Distrinct types check Distinct types check Oct 14, 2025
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.

1 participant