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

Member initialisation order error. #443

Closed
j-horner-c4x opened this issue Dec 20, 2022 · 3 comments
Closed

Member initialisation order error. #443

j-horner-c4x opened this issue Dec 20, 2022 · 3 comments

Comments

@j-horner-c4x
Copy link

First, thanks for putting the time into making this library.

I got an error when using cuda::memory::device::unique_ptr<T[]>

cuda\api\array.hpp(160): error : the initialization of member "cuda::array_t<T, NumDimensions>::dimensions_" will be done before that of member "cuda::array_t<T, NumDimensions>::context_handle_"

In version 0.6.1.

Swapping the initialisation order in the constructor to match the member list fixes the issue.

@eyalroz eyalroz added bug task and removed bug labels Dec 20, 2022
@eyalroz
Copy link
Owner

eyalroz commented Dec 20, 2022

Well, that's not an error - you're not required to initialize in the same order, but - sure, it's nicer to do it in order.

eyalroz added a commit that referenced this issue Dec 20, 2022
@eyalroz eyalroz self-assigned this Dec 20, 2022
@j-horner-c4x
Copy link
Author

Yeah, I suppose it's technically a warning. But I didn't have "warnings as errors" enabled... Anyway, thanks again!

@eyalroz
Copy link
Owner

eyalroz commented Dec 21, 2022

@j-horner-c4x : It may take a little time before 0.6.2 comes out with this integrated. For now you'll need to either use the development branch or reverse the order yourself.

eyalroz added a commit that referenced this issue Feb 10, 2023
eyalroz added a commit that referenced this issue Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants