michaeltyson / TPCircularBuffer

A simple, fast circular buffer implementation
http://atastypixel.com/blog/a-simple-fast-circular-buffer-implementation-for-audio-processing/
839 stars 141 forks source link

using in c++ code and 'atomic_fetch_add' #25

Closed oleg-naumenko closed 6 years ago

oleg-naumenko commented 6 years ago

had compile error: "No matching function for call to 'atomic_fetch_add'" when using inside obj-c++ and c++ classes.

changed typedef std::atomic_int atomicInt; to typedef std::atomic atomicInt;

and it worked. Is this change valid?

dave234 commented 6 years ago

@oleg-naumenko Which compiler are you using?

oleg-naumenko commented 6 years ago

Apple LLVM 9.0 (Xcode 9.2), GNU++11

RishatShamsutdinov commented 6 years ago

This PR solves this issue (for me at least).

andreabusi commented 6 years ago

Same problem here, @RishatShamsutdinov's fix solved the problem!

@michaeltyson Do you plan to accept the PR and make a new version for CocoaPods soon?

Thanks a lot!

michaeltyson commented 6 years ago

Done!