Why is the code in most STL implementations so convoluted?

后端 未结 6 1073
刺人心
刺人心 2021-01-30 06:15

The STL is a critical piece of the C++ world, most implementations derive from the initial efforts by Stepanov and Musser.

My question is given the criticality of the co

6条回答
  •  故里飘歌
    2021-01-30 07:05

    I suspect part of the reason is that the code in the STL is highly optimized. The sort of code being implemented has performance being much more important then readability. Because they are so widely used it makes sense to make them as fast as possible.

提交回复
热议问题