bloomberg/clang-p2996

Splices not entirely working in requires clauses

Opened this issue · 4 comments

This code example shows syntax that should be valid being rejected from a requires clause. Adding parentheses (as suggested by the error message, though it should be unnecessary) furthermore produces a crash.

picking up

Just for the record - another (relatively simpler) example where it doesn't work: https://godbolt.org/z/6K78sszEY

katzdm commented

Just for the record - another (relatively simpler) example where it doesn't work: https://godbolt.org/z/6K78sszEY

This one actually works as intended; that's a "simple requirement", so it should be an expression (but ^int represents a type). Putting typename in front of it should work, but manifests the same error as the example given above.

As far as I can tell, the issue seems to only show when parsing type requirements.

katzdm commented

As noted in offline discussion, this is probably an issue with parsing typename as a part of the splice type, instead of as a part of the requirement clause.