GodotECS / godex

Godex is a Godot Engine ECS library.
MIT License
1.2k stars 68 forks source link

build error: `error: 'as_const' is not a member of 'std'` #293

Open TCOR3987 opened 2 years ago

TCOR3987 commented 2 years ago

Getting this error when building godot with godex.

godotECS/godex/modules/godot/nodes/ecs_world.cpp:744:65: error: 'as_const' is not a member of 'std'; did you mean 'is_const'? 744 | const Storage *storage = std::as_const(world)->get_storage();

miroklarin commented 2 years ago

@TCOR3987 try to put this on top of ecs_world.cpp #include <utility>

TCOR3987 commented 2 years ago

Thanks that worked

AndreaCatania commented 2 years ago

@miroklarin Thx for looking into this! @TCOR3987 What's your operating system?

Feel free to submit a PR to fix this.

TCOR3987 commented 2 years ago

Fedora 36