Re: Code Error or Misleading Error Message?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The type of  __raw_set_flag<T> does not match to the 3rd argument of
__manip_flag

> Data.cc: In instantiation of ‘T Data::__set_flag(T&, const T&) [with T
> = unsigned int]’:
> Data.cc:83:36:   required from here
> Data.cc:62:54: error: no matching function for call to
> ‘Data::__manip_flag(unsigned int&, const unsigned int&, <unresolved
> overloaded function type>)’
>    { return __manip_flag(flag, bits, __raw_set_flag<T>); }
>                                                       ^
> Data.cc:62:54: note: candidate is:
> Data.cc:44:3: note: template<class T> T Data::__manip_flag(T&, T, T
> (*)(T&, const T&))
>    __manip_flag(T& flag, T bits, T (fn)(T&, const T&)) noexcept
>    ^

The following note explains the reason:

> Data.cc:44:3: note:   template argument deduction/substitution failed:
> Data.cc:62:54: note:   mismatched types ‘T (*)(T&, const T&)’ and
> ‘unsigned int (Data::*)(unsigned int&, const unsigned int&) noexcept’
>    { return __manip_flag(flag, bits, __raw_set_flag<T>); }
>                                                       ^
> Data.cc:62:54: note:   could not resolve address from overloaded
> function ‘__raw_set_flag<unsigned int>’
>





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux