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 error with g++11 #322
Comments
I can't see any reason why a declaration of a static |
A minimal reproducer: class base {
public:
base(void) {};
base(base &&) = delete;
};
class foo : public base {
};
template<typename C>
inline C &bar(void)
{
static C c{};
return c;
}
const foo &baz(void)
{
return bar<const foo>();
} which fails:
|
You could try this with different C++ version settings. Maybe the new GCC uses a new compiler version by default and there is some issue with that. |
Good point - it works with std=c++14 but not with std=c++17. I've assigned the RedHat bug which started this to the compilter team so hopefully they will either say it's a compiler bug or tell us what libosmium is doing wrong ;-) |
Both gcc 10 and clang 11 are happy though, even in c++17 mode. |
There's a gcc bug now (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98642) so I think we can close this. |
Compiling this file:
with g++ 11 (not yet released) fails:
does this look like an issue in osmium? or is it a compiler bug I should report?
The text was updated successfully, but these errors were encountered: