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
Expected result: It's not possible in general to forward declare something that requires repeating a lambda in the definition and declaration due to the repeated lambda expressions having different types. See https://compiler-explorer.com/z/GxKcYnhMe. So maybe these uses of a function expression should be banned.
Expected result: It's not possible in general to forward declare something that requires repeating a lambda in the definition and declaration due to the repeated lambda expressions having different types. See https://compiler-explorer.com/z/GxKcYnhMe. So maybe these uses of a function expression should be banned.
The above seems to only be a problem within a requires-clause (for order independence). 05d12f9 uses lambdas through UFCS in the signature of non-templated functions just fine.
Their use is fine in templates to some extent
(refer to https://eel.is/c++draft/temp.over.link, keywords "equivalent" and "functionally equivalent").
Besides the
type
with arequires
, these attempt to forward declare a function expression.Minimal reproducer (https://godbolt.org/z/b95ha454e):
Commands:
cppfront x.cpp2 clang++17 -std=c++2b -stdlib=libc++ -I $CPPFRONT_INCLUDE_DIR x.cpp
Expected result: It's not possible in general to forward declare something that requires repeating a lambda in the definition and declaration due to the repeated lambda expressions having different types. See https://compiler-explorer.com/z/GxKcYnhMe. So maybe these uses of a function expression should be banned.
Actual result and error:
Generated Cpp1.
Many Cpp1 errors.
Other observations: Now is #472.
The text was updated successfully, but these errors were encountered: