Open akowalew opened 6 years ago
That's an arguable point. I introduced "at" member function just for interface completeness in case someone would want to replace usage of say boost::circular_buffer with my StaticQueue (or vice versa) and get the same result. The embedded application should never use at() member function and I think my EventLoop doesn't use it. It seems your compiler tries to compile a function that is not used. The problem with using GASSERT macro is that it exists only in Debug mode compilation and disappears when compiled in Release mode. The at() member function is supposed to check index validity and report error in any compilation mode. I'd recommend cloning my code to your own repositories and removing the at() member function altogether to get your code compiled.
I haven't touched this project for quite a while, my hands are full with CommsChampion and related projects at this moment, and I don't known when I'll be able to look at this one again and test the latest gcc / clang compilers.
Thank you. I did it like you said, by removing at
function from StaticQueue
.
Project seems to work very well on current compilers (my toolchain is arm-none-eabi-gcc 7.2.0) with small fixes in other modules.
In the README you have said, that this library is not using exceptions. When I tried to compile simple program, that uses your
EventLoop
(which has inside aStaticQueue
object) with explicity disabled exceptions (-fno-exceptions
) I got an error, because there is throw used (StaticQueue.h:242):Maybe do you just replace this statement with
GASSERT(index < size());
and then leaveoperator[]
without any assertion?By the way, great work - awesome library!