Skip to content
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

The 'struct override{}' causes compilation failure #577

Open
bjadamson opened this issue Jul 17, 2023 · 1 comment
Open

The 'struct override{}' causes compilation failure #577

bjadamson opened this issue Jul 17, 2023 · 1 comment

Comments

@bjadamson
Copy link

Hello, this line is causing my compilation to fail to compile.

It happens when my test includes libfmt:

home/badamson/projects/rrogue/source/external/fmt/include/fmt/format.h:328:33: error: two or more data types in declaration of ‘type name’
  328 |   auto overflow(int_type ch) -> int_type override {
      |                                 ^~~~~~~~
/home/badamson/projects/rrogue/source/external/fmt/include/fmt/format.h:334:56: error: two or more data types in declaration of ‘type name’
  334 |   auto xsputn(const char_type* s, streamsize count) -> streamsize override {

The output is misleading, the cause over the error is because inside ut.hpp there is a 'struct override'. I don't know if this is a bug in gcc (it only happens when I build in release mode) but would you consider a different name than override for the struct here?

@bjadamson
Copy link
Author

I forgot to add, changing the name of the struct to anything else fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant