STLUtils.hpp 615 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-08-17
  6. * Changed: 2020-08-17
  7. *
  8. * */
  9. #ifndef STL_UTILS_HPP
  10. #define STL_UTILS_HPP
  11. #include <algorithm>
  12. namespace ls_std {
  13. template<class container, class dataType>
  14. class STLUtils {
  15. public:
  16. STLUtils() = default;
  17. ~STLUtils() = default;
  18. static bool contains(container _container, const dataType& _value) {
  19. return std::find(_container.begin(), _container.end(), _value) != _container.end();
  20. }
  21. };
  22. }
  23. #endif