Skip to content

Fixing Enum ambiguous calls#1560

Merged
SanderMertens merged 10 commits intoSanderMertens:masterfrom
Reddy-dev:patch-5
Feb 11, 2025
Merged

Fixing Enum ambiguous calls#1560
SanderMertens merged 10 commits intoSanderMertens:masterfrom
Reddy-dev:patch-5

Conversation

@Reddy-dev
Copy link
Copy Markdown
Contributor

No description provided.

@Reddy-dev
Copy link
Copy Markdown
Contributor Author

template<typename First, typename Second, if_t<is_enum<Second>::value> = 0>
    const First* get(Second constant) const {

and

template<typename First, typename Second, if_t<is_enum<Second>::value> = 0>
    First* get_mut(Second constant) const {
        const auto& et = enum_type<Second>(this->world_);
        const flecs::entity_t target = et.entity(constant);
        return get_mut<First>(target);
    }

I think are the only others that need to be changed

@Reddy-dev
Copy link
Copy Markdown
Contributor Author

Reddy-dev commented Feb 10, 2025

Now All should be added

@SanderMertens
Copy link
Copy Markdown
Owner

Can you add a test that fails without this fix?

@Reddy-dev
Copy link
Copy Markdown
Contributor Author

Can you add a test that fails without this fix?

the issue is a compiler error though, i can show you what code errored?

@Reddy-dev
Copy link
Copy Markdown
Contributor Author

TestEntity.add<ETestEnum>(ETestEnum::One);

@SanderMertens
Copy link
Copy Markdown
Owner

LGTM!

@SanderMertens SanderMertens merged commit 9de91ef into SanderMertens:master Feb 11, 2025
70 checks 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.

2 participants