Two things:
-
The indentation is actually fine, although nowadays unusual (and I personally hate it): they use an indentation of four, which is achieved via spaces, but use tabs for all multiples of eight. This used to be the standard almost everywhere (notably it’s still the default setting in several editors such as Vim). But as a consequence, the code is only indented correctly if you set your tab width to 8. So the code actually looks like this:
else if (_Where == end()) { // insert at end if after last element if (_DEBUG_LT_PRED(this->comp, _Key(_Rmost()), this->_Kfn(_Val))) return (_Insert(false, _Rmost(), _Val)); }
Which, though still unusual, is perfectly logical and legible.
-
It’s good style (or even mandated?) that the standard library uses only reserved identifiers to avoid name clashes with customers’ C++ code. These reserved names are either names starting with an underscore followed by a capital letter (
_DEBUG_LT_PRED
,_Key
), or two underscores (not in this code, but the GCC libstdc++ is littered with__x
etc.).
Hence the alphabet soup.
But yes, this code is indeed manually written – at least it is in the case of the GCC. The active source branch of the libstdc++ looks exactly like the code above, and isn’t auto-generated.