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

Compilation of dependent target fails with G++ targeting C++ standard #1010

Closed
luxapana opened this issue Oct 11, 2021 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@luxapana
Copy link

I am using latest release tag.
I get following compiler error when trying to include headers:

include/opentelemetry/sdk/metrics/sync_instruments.h:192:25: error: expected unqualified-id before ‘)’ token
    BoundUpDownCounter<T>() = default;

Apparently according to C++ 20 standard, above syntax is illegal.

We are using multiple features of C++ 20 so reverting to 17 would not work.

Any suggestions?

@luxapana luxapana added the bug Something isn't working label Oct 11, 2021
@lalitb
Copy link
Member

lalitb commented Oct 11, 2021

Apparently according to C++ 20 standard, above syntax is illegal.

Which version of g++ compiler? I don't see this construct deprecated in C++17, or removed in C++ 20 ( http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2131r0.html#removed ).

Any suggestions?

Feel free to raise a PR for the fix, and we will review the change - if that helps?

@luxapana
Copy link
Author

Here it is:
https://timsong-cpp.github.io/cppwp/n4861/diff.cpp17.class#2

Can certainly raise a PR for this.

@lalitb
Copy link
Member

lalitb commented Oct 11, 2021

https://timsong-cpp.github.io/cppwp/n4861/diff.cpp17.class#2

Thank you for the link. Will look forward to the PR.

@lalitb
Copy link
Member

lalitb commented Nov 2, 2021

#1029 fixes it.

@lalitb lalitb closed this as completed Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants