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

ring_buffer<T> breaks builds on c++20 (and versions < c++14) #54674

Closed
sehoffmann opened this issue Nov 6, 2021 · 3 comments · Fixed by #91208
Closed

ring_buffer<T> breaks builds on c++20 (and versions < c++14) #54674

sehoffmann opened this issue Nov 6, 2021 · 3 comments · Fixed by #91208

Comments

@sehoffmann
Copy link

Godot version

3.x, 4.x

System information

n/a

Issue description

RingBuffer<T>(int p_power = 0) {

Obviously this is very odd code (didn't even know that this is even valid). However, apparently this was accidentally introduced in C++14. They remove it in C++20 now, which means that the coder works only with c++14 <= version < c++20. See https://stackoverflow.com/questions/63513984/can-class-template-constructors-have-a-redundant-template-parameter-list-in-c2

This code is both in 4.x as well as 3.x

Steps to reproduce

n/a

Minimal reproduction project

No response

@ShlomiRex
Copy link
Contributor

ShlomiRex commented Nov 6, 2021

Tried compiling godot with MSVC c++ but get tons of errors, spesifically 'Compiler Error C2666': https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-2/compiler-error-c2666?view=msvc-160.
I added some operator== functions, it fixes it, but it keeps on getting more and more (basically too much for me to handle).
Perhaps we can withhold this untill we have C++20 support.

@sehoffmann
Copy link
Author

Perhaps we can withhold this untill we have C++20 support.

Only the <T> need to be removed from both the ctor and dtor.

@akien-mga
Copy link
Member

Fixed by #91208.

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

Successfully merging a pull request may close this issue.

6 participants