Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad error for tag component misuse #175

Open
Kelwan opened this issue May 31, 2023 · 0 comments
Open

Bad error for tag component misuse #175

Kelwan opened this issue May 31, 2023 · 0 comments

Comments

@Kelwan
Copy link
Contributor

Kelwan commented May 31, 2023

When declaring a tag component, I accidentally made the mistake of declaring it in a system as readonly. The error given doesn't give a good description for the problem:

bazel-out/x64_windows-fastbuild-ST-0c60ee3d0c63/bin\system_impls/generated_sources/main.ecsact.systems.hh:60:15: error: no matching member function for call to 'get'                  
                return _ctx.get<cconf::demo::Player>();                                                                                                                                
                       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                   
external/ecsact_lang_cpp\ecsact/cpp/execution_context.hh:32:4: note: candidate template ignored: constraints not satisfied [with C = cconf::demo::Player]                              
        C get() const {                                                                                                                                                                
          ^
external/ecsact_lang_cpp\ecsact/cpp/execution_context.hh:31:12: note: because '!std::is_empty_v<cconf::demo::Player>' evaluated to false
                requires(!std::is_empty_v<C>)

Ecsact file example:

Component Player;

System DoThingWithPlayer {
    // Causes error above
    readonly Player;
}
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

No branches or pull requests

1 participant