You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be a safer and more C++ style usage of the Queue's to take a template argument T and a runtime queue-size as the only constructor argument.
The rationale here is the specialization makes the type that is inside the queue well known, and functions that return objects can now take T& instead of pointers, preventing null pointer errors at compile time.
The text was updated successfully, but these errors were encountered:
I think it would be a safer and more C++ style usage of the Queue's to take a template argument T and a runtime queue-size as the only constructor argument.
Something like:
The rationale here is the specialization makes the type that is inside the queue well known, and functions that return objects can now take T& instead of pointers, preventing null pointer errors at compile time.
The text was updated successfully, but these errors were encountered: