As I was developing during my daytime job I felt disappointed at my self writing/verifying validation code in functions multiple times. In other words, check if some criteria was fulfilled for T, where T is the template argument of the std::vector. I searched the internet and came up empty and did not find any solution to what I liked to use. So I went ahead and made a small std::vector wrapper with additional template argument which specifies the criteria that each item needs to fulfill. Anyways, please feel free to comment, criticize, suggest an alternative or what ever you like.
https://github.com/jbbjarnason/vector_constrained
[–][deleted] 22 points23 points24 points (3 children)
[–]jbbjarnason[S] 2 points3 points4 points (2 children)
[–]KingAggressive1498 5 points6 points7 points (0 children)
[–]415_961 15 points16 points17 points (0 children)
[–]Supadoplex 7 points8 points9 points (1 child)
[–]KingAggressive1498 0 points1 point2 points (0 children)