In the section «11.4.3 Non-static member functions» of the C++23 Standard there is present the following code example (example 1):
void tnode::set(const char* w, tnode* l, tnode* r) {
count = strlen(w)+1;
if (sizeof(tword)<=count)
perror("tnode string too long");
strcpy(tword,w);
left = l;
right = r;
}
Should it be
if (sizeof(tword)<count)
instead of
if (sizeof(tword)<=count)
?
With best regards
(Vlad from Moscow)