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

报错:no suitable user-defined conversion from "CudaAllocator<int>" to "CudaAllocator<std::_Container_proxy>" exists #23

Open
anzisheng opened this issue Aug 30, 2023 · 3 comments

Comments

@anzisheng
Copy link

在08课程04_sugar\01下面生成 visual studio 2022 项目之后,运行报错如下:
“no suitable user-defined conversion from "CudaAllocator" to "CudaAllocatorstd::_Container_proxy" exists”,请问老师如何修改?

@archibate
Copy link
Collaborator

@archibate
Copy link
Collaborator

    template <class U> // cihou shabi wendous
    constexpr CudaAllocator(CudaAllocator<U> const &other) noexcept {
    }

    constexpr bool operator==(CudaAllocator<T> const &other) const {
        return this == &other;
    }

@anzisheng
Copy link
Author

@archibate 小彭老师,我试验了一下,好像没有效果,仍然保一样的错。

This was referenced Dec 2, 2023
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