Skip to content

Commit

Permalink
change default template argument for splitString
Browse files Browse the repository at this point in the history
  • Loading branch information
ludviggunne committed Jan 18, 2025
1 parent 86c1f46 commit 2ecfb14
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <type_traits>
#include <vector>
#include <cstring>
#include <list>

struct SelectMapKeys {
template<class Pair>
Expand Down Expand Up @@ -404,7 +403,7 @@ static inline T* empty_if_null(T* p)
* @param sep The separator
* @return The list of separate strings (including empty ones). The whole input string if no separator found.
*/
template<template<class ...> class T = std::list>
template<template<class ...> class T = std::vector>
T<std::string> splitString(const std::string& str, char sep)
{
if (std::strchr(str.c_str(), sep) == nullptr)
Expand Down

0 comments on commit 2ecfb14

Please sign in to comment.