Skip to content

[BUG] Cannot specity <const> or <in> in function template arguments #456

Closed
@realgdman

Description

@realgdman

I'm using library (flecs) with API like

ecs.system<Position, const Velocity>()
.each([] some lambda

And haven't found way to specify that const in template call to system()
Which, I believe, cannot be deduced from parameters of lambda

foo<int>();
foo<const int>(); //error
foo<int const>(); //error
foo<in int>(); //error

https://cpp2.godbolt.org/z/sjMWTq3b7

But according to this comment #425 (comment) , it works on pointers
https://cpp2.godbolt.org/z/Tx8e9KfKc
f<* const int>();

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions