标签: c++ c++11 reference undefined-behavior
我最感兴趣的是:
T& tr = SomeSource(); T* tp = &tr; T t = tp[5];
引发此问题(and seems to have been asked befor)的具体示例是:
std::string s = "01234567"; char *c = &s[0]; // Do something with it. c[4] = 'f'; // Is this valid or undefined behavior
上下文: