-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Compilation failed: conflicting declaration of boost_concept_check93
#994
Comments
This compiles w/o an error for me using "Apple clang version 16.0.0 (clang-1600.0.26.6)" and the latest boost release. |
Instead of including
also produce the same error. It might be easier to inspect what happened. Also, clang++-19 compiles the code without any error. It seems like a gcc-only issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Full compilation error:
Source code (and also, this is the minimal reproducible example I can get):
My original environment uses boost 1.83.0, and I've tried that 1.87.0, but it has the same issue. g++ 11.4.0, g++ 13.1.0 and g++ 14.2.0 all cause the error too.
boost_concept_check93 is maybe generated in this line, with
__LINE__ == 93
. Interestingly, line 93 is exactly this line. I think somehow the preprocessor replaced the wrong line number with__LINE__
and caused this.The code contains a long
LIST
and aFAKE_HEADER
.LIST
contains 489 entries. If removing any one entry in the list (making it less than 489 entries), the code will compile. If you remove any function in the fake header, the code will compile as well. I think it has some relation between the number of total tokens in the macro. It could be a bug or limitation from gcc.The text was updated successfully, but these errors were encountered: