编译DNG SDK时的错误C2664,在std内部 [英] error C2664 when compiling DNG SDK, somewhere inside std
本文介绍了编译DNG SDK时的错误C2664,在std内部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(952): error C2664: 'dng_std_allocator<_Newfirst>::dng_std_allocator(dng_std_allocator<_Newfirst> &&)': cannot convert argument 1 from 'std::_Wrap_alloc<dng_std_allocator<dng_noise_function>>' to 'const dng_std_allocator<_Newfirst> &'
2> with
2> [
2> _Newfirst=std::_Container_proxy
2> ]
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(952): note: Reason: cannot convert from 'std::_Wrap_alloc<dng_std_allocator<dng_noise_function>>' to 'const dng_std_allocator<_Newfirst>'
2> with
2> [
2> _Newfirst=std::_Container_proxy
2> ]
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0(952): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(588): note: see reference to function template instantiation 'std::_Wrap_alloc<dng_std_allocator<_Newfirst>>::_Wrap_alloc<std::_Wrap_alloc<dng_std_allocator<dng_noise_function>>&>(_Other) noexcept' being compiled
2> with
2> [
2> _Newfirst=std::_Container_proxy,
2> _Other=std::_Wrap_alloc<dng_std_allocator<dng_noise_function>> &
2> ]
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(588): note: see reference to function template instantiation 'std::_Wrap_alloc<dng_std_allocator<_Newfirst>>::_Wrap_alloc<std::_Wrap_alloc<dng_std_allocator<dng_noise_function>>&>(_Other) noexcept' being compiled
2> with
2> [
2> _Newfirst=std::_Container_proxy,
2> _Other=std::_Wrap_alloc<dng_std_allocator<dng_noise_function>> &
2> ]
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(586): note: while compiling class template member function 'void std::_Vector_alloc<std::_Vec_base_types<_Ty,_Alloc>>::_Free_proxy(void)'
2> with
2> [
2> _Ty=dng_noise_function,
2> _Alloc=dng_std_allocator<dng_noise_function>
2> ]
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(564): note: see reference to function template instantiation 'void std::_Vector_alloc<std::_Vec_base_types<_Ty,_Alloc>>::_Free_proxy(void)' being compiled
2> with
2> [
2> _Ty=dng_noise_function,
2> _Alloc=dng_std_allocator<dng_noise_function>
2> ]
2>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\vector(680): note: see reference to class template instantiation 'std::_Vector_alloc<std::_Vec_base_types<_Ty,_Alloc>>' being compiled
2> with
2> [
2> _Ty=dng_noise_function,
2> _Alloc=dng_std_allocator<dng_noise_function>
2> ]
2>e:\dev\vr\dng_sdk_1_4\dng_sdk\source\dng_negative.h(178): note: see reference to class template instantiation 'std::vector<dng_noise_function,dng_std_allocator<dng_noise_function>>' being compiled
该项目是一个VS 2013项目,我在VS 2017中更改为使用VS 2015工具集。
The project is a VS 2013 project that I changed to use the VS 2015 toolset in VS 2017.
有问题的行(dng_negative.h中最后提到的那一行是:
The line in question (the one mentioned at the end, in dng_negative.h, is:
dng_std_vector<dng_noise_function> fNoiseFunctions;
其中dng_std_vector是:
where dng_std_vector is:
template <class T> using dng_std_vector = std::vector<T, dng_std_allocator<T> >;
任何人都可以向我解释此错误吗?从dng_std_vector更改此错误to std :: vector确实有帮助。
Can anyone explain this error to me? Changing this from dng_std_vector to std::vector does help.
推荐答案
你好,
感谢您在此处发帖。
>>可以任意ne向我解释这个错误?将它从dng_std_vector更改为std :: vector确实有帮助。
看看
此链接。
祝福,
Jack Zhang
Jack Zhang
这篇关于编译DNG SDK时的错误C2664,在std内部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文