Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Actually, it should be written more like this:

    template<typename T>
    std::pair<T, std::vector<std::string_view>>
    tokenize_string(T &&str);
So then it uses `std::forward` to conditionally move the string for rvalues, and `T` will be a reference to the original string for lvalues.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: