llama: Add static_assert in the string_split template to ensure the correct template specialization is used for std::string
This commit is contained in:
parent
e41cfc7ab8
commit
b96ef696c5
1 changed files with 1 additions and 0 deletions
|
@ -387,6 +387,7 @@ void string_replace_all(std::string & s, const std::string & search, const std::
|
|||
|
||||
template<class T>
|
||||
static std::vector<T> string_split(const std::string & str, char delim) {
|
||||
static_assert(!std::is_same<T, std::string>::value, "Please use the specialized version for std::string");
|
||||
std::vector<T> values;
|
||||
std::istringstream str_stream(str);
|
||||
std::string token;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue