prog.cpp:7:19: error: ‘size_t’ does not name a type
static constexpr size_t item_size_ = sizeof(ItemType);
^~~~~~
prog.cpp:7:19: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
prog.cpp:1:1:
+#include <cstddef>
prog.cpp:7:19:
static constexpr size_t item_size_ = sizeof(ItemType);
^~~~~~
prog.cpp:8:2: error: ‘uint8_t’ does not name a type
uint8_t* const buffer_;
^~~~~~~
prog.cpp:9:8: error: ‘size_t’ does not name a type
const size_t size_;
^~~~~~
prog.cpp:9:8: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
prog.cpp:13:2: error: ‘QueueHandle_t’ does not name a type
QueueHandle_t handle_;
^~~~~~~~~~~~~
prog.cpp:14:2: error: ‘StaticQueue_t’ does not name a type; did you mean ‘static_assert’?
StaticQueue_t data_;
^~~~~~~~~~~~~
static_assert
prog.cpp:20:26: error: expected ‘)’ before ‘*’ token
IRtosStaticQueue(uint8_t* const buffer, const size_t size)
~ ^
)
prog.cpp:37:2: error: ‘QueueHandle_t’ does not name a type
QueueHandle_t handle(void){ return handle_; }
^~~~~~~~~~~~~
prog.cpp:41:2: error: ‘size_t’ does not name a type
size_t size(void){ return size_; }
^~~~~~
prog.cpp:41:2: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
prog.cpp:84:38: error: ‘TickType_t’ has not been declared
bool TryGetBlocking(ItemType& item, TickType_t blocking_time_ticks)
^~~~~~~~~~
prog.cpp: In destructor ‘IRtosStaticQueue<ItemType>::~IRtosStaticQueue()’:
prog.cpp:24:24: error: there are no arguments to ‘assert’ that depend on a template parameter, so a declaration of ‘assert’ must be available [-fpermissive]
~IRtosStaticQueue() { assert(false); };
^~~~~~
prog.cpp:24:24: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
prog.cpp: In member function ‘void IRtosStaticQueue<ItemType>::Init()’:
prog.cpp:30:3: error: there are no arguments to ‘assert’ that depend on a template parameter, so a declaration of ‘assert’ must be available [-fpermissive]
assert(not is_initialized_);
^~~~~~
prog.cpp:31:3: error: ‘handle_’ was not declared in this scope
handle_ = xQueueCreateStatic(size_, item_size_, buffer_, &data_);
^~~~~~~
prog.cpp:31:32: error: ‘size_’ was not declared in this scope
handle_ = xQueueCreateStatic(size_, item_size_, buffer_, &data_);
^~~~~
prog.cpp:31:32: note: suggested alternative: ‘signed’
handle_ = xQueueCreateStatic(size_, item_size_, buffer_, &data_);
^~~~~
signed
prog.cpp:31:39: error: ‘item_size_’ was not declared in this scope
handle_ = xQueueCreateStatic(size_, item_size_, buffer_, &data_);
^~~~~~~~~~
prog.cpp:31:51: error: ‘buffer_’ was not declared in this scope
handle_ = xQueueCreateStatic(size_, item_size_, buffer_, &data_);
^~~~~~~
prog.cpp:31:61: error: ‘data_’ was not declared in this scope
handle_ = xQueueCreateStatic(size_, item_size_, buffer_, &data_);
^~~~~
prog.cpp:31:13: error: there are no arguments to ‘xQueueCreateStatic’ that depend on a template parameter, so a declaration of ‘xQueueCreateStatic’ must be available [-fpermissive]
handle_ = xQueueCreateStatic(size_, item_size_, buffer_, &data_);
^~~~~~~~~~~~~~~~~~
prog.cpp: In member function ‘void IRtosStaticQueue<ItemType>::Reset()’:
prog.cpp:47:3: error: there are no arguments to ‘assert’ that depend on a template parameter, so a declaration of ‘assert’ must be available [-fpermissive]
assert(is_initialized_);
^~~~~~
prog.cpp:48:15: error: ‘handle_’ was not declared in this scope
xQueueReset(handle_);
^~~~~~~
prog.cpp:48:3: error: there are no arguments to ‘xQueueReset’ that depend on a template parameter, so a declaration of ‘xQueueReset’ must be available [-fpermissive]
xQueueReset(handle_);
^~~~~~~~~~~
prog.cpp: In member function ‘bool IRtosStaticQueue<ItemType>::TryPut(ItemType)’:
prog.cpp:57:3: error: there are no arguments to ‘assert’ that depend on a template parameter, so a declaration of ‘assert’ must be available [-fpermissive]
assert(is_initialized_);
^~~~~~
prog.cpp:58:28: error: ‘handle_’ was not declared in this scope
auto result = xQueueSend(handle_, &item, 0);
^~~~~~~
prog.cpp:59:16: error: ‘pdPASS’ was not declared in this scope
if(result != pdPASS) { return false; }
^~~~~~
prog.cpp: In member function ‘bool IRtosStaticQueue<ItemType>::TryGet(ItemType&)’:
prog.cpp:69:3: error: there are no arguments to ‘assert’ that depend on a template parameter, so a declaration of ‘assert’ must be available [-fpermissive]
assert(is_initialized_);
^~~~~~
prog.cpp:71:31: error: ‘handle_’ was not declared in this scope
auto result = xQueueReceive(handle_, item_local, 0);
^~~~~~~
prog.cpp:72:16: error: ‘pdTRUE’ was not declared in this scope
if(result == pdTRUE) {
^~~~~~
prog.cpp: In member function ‘bool IRtosStaticQueue<ItemType>::TryGetBlocking(ItemType&, int)’:
prog.cpp:86:3: error: there are no arguments to ‘assert’ that depend on a template parameter, so a declaration of ‘assert’ must be available [-fpermissive]
assert(is_initialized_);
^~~~~~
prog.cpp:88:31: error: ‘handle_’ was not declared in this scope
auto result = xQueueReceive(handle_, item_local, blocking_time_ticks);
^~~~~~~
prog.cpp:89:16: error: ‘pdTRUE’ was not declared in this scope
if(result == pdTRUE) {
^~~~~~
prog.cpp: At global scope:
prog.cpp:97:30: error: ‘size_t’ has not been declared
template <typename ItemType, size_t size>
^~~~~~
prog.cpp:101:2: error: ‘uint8_t’ does not name a type
uint8_t buffer_[size * sizeof(ItemType)];
^~~~~~~