报错:no suitable user-defined conversion from "CudaAllocator<int>" to "CudaAllocator<std::_Container_proxy>" exists
anzisheng opened this issue · comments
anzisheng commented
在08课程04_sugar\01下面生成 visual studio 2022 项目之后,运行报错如下:
“no suitable user-defined conversion from "CudaAllocator" to "CudaAllocatorstd::_Container_proxy" exists”,请问老师如何修改?
彭于斌 commented
彭于斌 commented
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 commented
@archibate 小彭老师,我试验了一下,好像没有效果,仍然保一样的错。