You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Parameter direction for template parameter is ignored #425
Seems like a bug: https://cpp2.godbolt.org/z/Tx8e9KfKc.
I suggest you open a new issue, since this one is about template parameters, not template arguments.
I don't think that can work.
In a subexpression, a parameter direction operates on an expression, not a type. cppfront doesn't have enough semantic information for f<in int>() to work.
Activity
realgdman commentedon May 13, 2023
Possibly related: I'm using library (flecs) with API like
And haven't found way to specify that
constin template call to system()Which, I believe, cannot be deduced from parameters of lambda
https://cpp2.godbolt.org/z/sjMWTq3b7
JohelEGP commentedon May 13, 2023
Seems like a bug: https://cpp2.godbolt.org/z/Tx8e9KfKc.
I suggest you open a new issue, since this one is about template parameters, not template arguments.
realgdman commentedon May 13, 2023
Ok, I do later, what I mean by related is, should I be able to put
inin <> in that case.JohelEGP commentedon May 13, 2023
I don't think that can work.
In a subexpression, a parameter direction operates on an expression, not a type.
cppfrontdoesn't have enough semantic information forf<in int>()to work.hsutter commentedon Aug 13, 2023
Yes, this is by design -- I don't know what it would mean.
I should probably emit a diagnostic for it though. Thanks!
BREAKING CHANGE: Change contracts syntax to align with P2661R1
Add diagnostic to disallow a parameter-direction on a template parame…
Add diagnostic to disallow a parameter-direction on a template parame…