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

Fixes gcc11 c++20 compilation error #137

Merged
merged 1 commit into from
Dec 30, 2021
Merged

Fixes gcc11 c++20 compilation error #137

merged 1 commit into from
Dec 30, 2021

Conversation

actboy168
Copy link
Contributor

3rd/ozz-animation/include/ozz/base/containers/std_allocator.h:52:28: error: expected unqualified-id before 'const'
   52 |   StdAllocator<value_type>(const StdAllocator<_Other>&) noexcept {}
      |                            ^~~~~
3rd/ozz-animation/include/ozz/base/containers/std_allocator.h:52:28: error: expected ')' before 'const'
   52 |   StdAllocator<value_type>(const StdAllocator<_Other>&) noexcept {}
      |                           ~^~~~~
      |                            )

@guillaumeblanc
Copy link
Owner

Hi,

thanks for reporting the issue and submitting a PR ! The fix looks good.

I tried to reproduce the error, writing a unit test that was missing: https://github.com/guillaumeblanc/ozz-animation/blob/feature/allocator/test/base/containers/std_containers_tests.cc#L43. I was expecting to use it to test your fix, but I couldn't trigger the error. Any idea?

Cheers,
Guillaume

@actboy168
Copy link
Contributor Author

I checked my compiler options, this error is only raised under c++20.

@guillaumeblanc
Copy link
Owner

guillaumeblanc commented Dec 30, 2021

Thanks for checking!
I was able to reproduce the issue with c++20: https://github.com/guillaumeblanc/ozz-animation/actions/runs/1636673502, so I'll merge the PR to this new branch.

Cheers,
Guillaume

@guillaumeblanc guillaumeblanc changed the base branch from develop to feature/allocator December 30, 2021 07:36
@guillaumeblanc guillaumeblanc changed the title Fixes gcc11 error Fixes gcc11 c++20 compilation error Dec 30, 2021
@guillaumeblanc guillaumeblanc merged commit 6d39a7f into guillaumeblanc:feature/allocator Dec 30, 2021
@guillaumeblanc
Copy link
Owner

Seems something is still bothering g++11: https://github.com/guillaumeblanc/ozz-animation/actions/runs/1636950038
Any idea?

@actboy168
Copy link
Contributor Author

I can't reproduce it. It may be caused by out of memory.

https://stackoverflow.com/questions/30887143/make-j-8-g-internal-compiler-error-killed-program-cc1plus

@guillaumeblanc
Copy link
Owner

I think you're right, build passes if I disable parallel build: https://github.com/guillaumeblanc/ozz-animation/actions/runs/1643126498.
Thanks for your help.

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

Successfully merging this pull request may close these issues.

2 participants