libde265
libde265 copied to clipboard
Clang: error: call to 'move' is ambiguous
When compiling with clang I saw this error:
libde265/encoder/algo/coding-options.cc:67:23: error: call to 'move' is ambiguous
mOptions.push_back( std::move(opt) );
^~~~~~~~~
libde265/encoder/algo/coding-options.cc:198:16: note: in instantiation of member function 'CodingOptions<enc_tb>::new_option' requested here
template class CodingOptions<enc_tb>;
^
???/clang/include/c++/v1/type_traits:2290:1: note: candidate function [with _Tp = CodingOptions<enc_tb>::CodingOptionData &]
move(_Tp&& __t) _NOEXCEPT
^
libde265/util.h:87:52: note: candidate function [with _Tp = CodingOptions<enc_tb>::CodingOptionData &]
inline typename std::remove_reference<_Tp>::type&& move(_Tp&& __t) {
^
libde265/encoder/algo/coding-options.cc:67:23: error: call to 'move' is ambiguous
mOptions.push_back( std::move(opt) );
^~~~~~~~~
libde265/encoder/algo/coding-options.cc:199:16: note: in instantiation of member function 'CodingOptions<enc_cb>::new_option' requested here
template class CodingOptions<enc_cb>;
^
???/clang/include/c++/v1/type_traits:2290:1: note: candidate function [with _Tp = CodingOptions<enc_cb>::CodingOptionData &]
move(_Tp&& __t) _NOEXCEPT
^
libde265/util.h:87:52: note: candidate function [with _Tp = CodingOptions<enc_cb>::CodingOptionData &]
inline typename std::remove_reference<_Tp>::type&& move(_Tp&& __t) {
^
I worked around it by changing line 67 of encoder/algo/coding-options.cc from mOptions.push_back( std::move(opt) ); to mOptions.push_back(opt);.
It may be that class context_model_table requires a move constructor and/or operator=.