use call-by-value with std::move() function

This commit is contained in:
Axel Kohlmeyer
2021-10-14 01:21:54 -04:00
parent e56cc9be00
commit 2106075320
4 changed files with 7 additions and 6 deletions

View File

@ -35,7 +35,7 @@ class Tokenizer {
size_t ntokens;
public:
Tokenizer(const std::string &str, const std::string &separators = TOKENIZER_DEFAULT_SEPARATORS);
Tokenizer(std::string str, std::string separators = TOKENIZER_DEFAULT_SEPARATORS);
Tokenizer(Tokenizer &&);
Tokenizer(const Tokenizer &);
Tokenizer &operator=(const Tokenizer &);