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

AsyncProgress(Queue)Worker progress class requires default constructor #875

Open
robinchrist opened this issue Nov 8, 2019 · 2 comments

Comments

@robinchrist
Copy link

robinchrist commented Nov 8, 2019

Hi,

Due to the following line:
T *new_data = new T[count];
in the AsyncProgress(Queue)Worker class T (your progress class) is required to have a default constructor.

I have prepared a patch which makes use of C++17 (std::aligned_alloc and std::uninitialized_copy) features and removes the necessity of the progress struct having a default constructor.

Should I wrap the patch in a feature guard (__cplusplus macro check) and file a merge request?

@kkoopa
Copy link
Collaborator

kkoopa commented Nov 12, 2019

@bnoordhuis Any opinion on this?

@kkoopa
Copy link
Collaborator

kkoopa commented Nov 20, 2019

If it is not much work for you, do file a PR. It would at least make it easier to evaluate its impact. The only possible problem I can imagine right now is a compiler which is marketed as supporting a particular C++ standard, but actually does not do so fully.

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

2 participants