Code Room
Code reviewHard
Question
Review this C++ code using std::string_view.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
#include <string>#include <string_view> std::string make_name(int id) { return "user-" + std::to_string(id);} void run(int id) { std::string_view sv = make_name(id); // ... later ... process(sv); // takes std::string_view}Run or narrate your approach, then ask the coach.