Set implementation

Is it possible to find the full implementation of the STL set on the network, in particular, iterator interests me?

+4
source share
4 answers
  • In Visual Studio, a simple way is to right-click on #include <set> and "Open Document": the IDE will look for inclusion paths for you and open the file regardless of your installation directory
  • Sources for libstdC ++ are available and can be easily accessed on the Internet (in fact, I often refer to this site as documentation): the code for the set can be found here .
+1
source

If you have a C ++ compiler, you can look in the <set> header file.

0
source

You can also view the SGI STL here: http://www.sgi.com/tech/stl/set .

0
source

If you find it difficult to find a set implementation, it will probably be very difficult for you to understand what you are reading when you eventually find it. STL is well known as one of the most complex bits of C ++ code to understand, and this is especially true for the more complex container classes that it provides (std :: find is actually quite easy to compare).

Instead, maybe an easier task is to look at the code for an example written for use by ordinary people, rather than the incomprehensible code found in the most common STL implementations. This looks promising , and compares pretty well to what std::set really does.

0
source

All Articles