-
Notifications
You must be signed in to change notification settings - Fork 260
[BUG] requires clause does not appear in "cpp2 type definitions and function declaration" causing out-of-line definition error #323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
While looking for a place on how to fix it, I have found comments: Lines 5110 to 5129 in 827ed79
And the Line 5013 in 827ed79
|
@hsutter regarding gcc-11 installation on Ubuntu 20.04 - have you tried #293 (comment) ? TLDR: you can install add-apt-repository -y ppa:ubuntu-toolchain-r/test && apt-get update && apt-get install -y --no-install-recommends gcc-11 g++-11 |
|
GCC not-10 is also broken: https://cpp2.godbolt.org/z/MsY89sMxh. |
Proof that not emitting
It wants to call the unconstrained forward declaration!
|
In the current implementation of cppfront (827ed79), the following code:
Generates:
Trying to compile that with cpp1 compiler (
Apple clang version 14.0.3
in my case):The fix is pretty straightforward - requires clause must also appear in the
Cpp2 type definitions and function declarations
section (I have changed that manually, and it works).The text was updated successfully, but these errors were encountered: