godex icon indicating copy to clipboard operation
godex copied to clipboard

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

Open ghost opened this issue 3 years ago • 4 comments

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<const TransformComponent> *storage = std::as_const(world)->get_storage<const TransformComponent>();

ghost avatar Jun 02 '22 08:06 ghost

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

miroklarin avatar Jun 12 '22 20:06 miroklarin

Thanks that worked

TCOR3987 avatar Jun 12 '22 23:06 TCOR3987

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

Feel free to submit a PR to fix this.

AndreaCatania avatar Jun 13 '22 06:06 AndreaCatania

Fedora 36

TCOR3987 avatar Jun 13 '22 09:06 TCOR3987