We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Most backends allow a call like this to happen:
long* ptr = ... atomic_fetch_add(ptr,2);
This is enabled by an explicit available overload of:
void atomic_fetch_add(long* ptr, const long val);
For some backends (like Serial only) we only have this function:
template<class T> void atomic_fetch_add(T* ptr, const T val);
This will fail to match since the template deduction is ambiguous, it could either be long or int. To make this match we could do the following:
template<class T> void atomic_fetch_add(T* ptr, typename std::add_const<T>::type& val);
Now only the first parameter is used for the actual deduction of T and val follows matching rules which include implicit conversions.
The text was updated successfully, but these errors were encountered:
I am fixing one of those cases for Serial, since I can't get FENL to compile otherwise.
Sorry, something went wrong.
@crtrott I think you managed to fix all of these?
crtrott
No branches or pull requests
Most backends allow a call like this to happen:
This is enabled by an explicit available overload of:
For some backends (like Serial only) we only have this function:
This will fail to match since the template deduction is ambiguous, it could either be long or int.
To make this match we could do the following:
Now only the first parameter is used for the actual deduction of T and val follows matching rules which include implicit conversions.
The text was updated successfully, but these errors were encountered: