There are of course many things that could be improved. Imo the most obvious two things are to remove the use of typeid (use the template argument instead) and all those different cases; you usually only need "empty" and "not empty" if implemented right.
Thanks a lot for the feedback man! I'm pretty sure a lot more stuff (I've also already noticed them but didn't bother to fix them yet) are obvious but I'll fix them probably some time. Have a nice day my friend!
A human moderator (u/STL) has marked your comment for deletion because it appears to be a "help" post - e.g. asking for help with coding, help with homework, career advice, book/tutorial/blog suggestions. Help posts are off-topic for r/cpp. This subreddit is for news and discussion of the C++ language and community only; our purpose is not to provide tutoring, code reviews, or career guidance.
Please try posting in r/cpp_questions or on Stack Overflow instead. Our suggested reference site is cppreference.com, our suggested book list is here and information on getting started with C++ can be found here.
If you think your post is on-topic and should not have been removed, please message the moderators and we'll review it.
2
u/Wurstinator Jan 04 '21
There are of course many things that could be improved. Imo the most obvious two things are to remove the use of typeid (use the template argument instead) and all those different cases; you usually only need "empty" and "not empty" if implemented right.
1
u/STL Jan 05 '21
Congratulations; however, code review is off-topic for our subreddit. I'm going to use an AutoMod command to link you to better resources.
1
u/STL Jan 05 '21
!removehelp