79772230

Date: 2025-09-23 05:20:39
Score: 2.5
Natty:
Report link

Ok, from cppreference

if pos < size(), or if pos == size() -> Returns a reference to CharT(), if the object referred by the returned reference is modified to any value other than CharT(), the behavior is undefined.

So, overall this code produces undefined behaviour, which just seems to be correct

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: sat0sh1c