SMFSW / Queue

Queue handling library (designed on Arduino)
BSD 3-Clause "New" or "Revised" License
93 stars 20 forks source link

Missing definition for size_t #18

Closed Schop0 closed 1 year ago

Schop0 commented 1 year ago

The Arduino IDE probably provides a size_t but plain C++ does not. I think cppQueue.h should include stddef.h to be more self-contained.

I've noticed this problem when including cppQueue.h from a C++ source file instead of an .ino sketch. Compiling with the Arduino IDE gives the following error:

[library path omitted]src/cppQueue.h:37:2: error: 'size_t' does not name a type
  size_t   queue_sz; //!< Size of the full queue
  ^~~~~~