3 ms·
std::string allocates heap memory; usually it's implemented as std::vector<char> behind the scenes, whereas with string_view it's implemented as const char *, t
by stefanos82 4y ago
std::string allocates heap memory; usually it's implemented as std::vector<char> behind the scenes, whereas with string_view it's implemented as const char *, thus the string it's allocated in stack.