Apologies if I'm asking a silly newbie question. I'm new to C++ (familiar with C and objective C) and wanted to use the rope from the standard template library. Is this included with the libraries that Xcode uses? I have tried #include <vector>
and the same for map successfully and also ext/hash_map
. However rope does not seem to be available. Do I just have to download the source and include it in my project?
Asked
Active
Viewed 640 times
-1

John P
- 625
- 2
- 7
- 15
-
3There isn't a `rope` in the standard C++ library. Why do you think there is? – Alan Stokes Aug 31 '15 at 10:47
-
I just searched "C++ standard template library" and got this https://www.sgi.com/tech/stl/download.html – John P Aug 31 '15 at 10:47
-
Are there multiple versions of the 'standard' template library then? – John P Aug 31 '15 at 10:54
-
1This is a good starting point for what is in the standard library: http://en.cppreference.com/ – Alan Stokes Aug 31 '15 at 11:03
-
1@JohnP - The confusion (understandable) is between **a** standard template library, and **the** template library defined in the C++ standard. It doesn't get easier by the fact than large parts (but not all) of the STL got included in the language standard. Rope is one part that didn't get included. – Bo Persson Aug 31 '15 at 11:11
-
The library "STL" was named years before C++ was standardised. As an indication of how ancient it is, the most FAQ is "Is the STL Y2K compliant?". (And there's no "standard template library" in C++, only the "standard library".) – molbdnilo Aug 31 '15 at 11:57
-
Very good answer on STL and standard library : stackoverflow.com/questions/5205491/whats-this-stl-vs-c-standard-library-fight-all-about – MokaT Sep 04 '15 at 15:21
2 Answers
1
Unfortunately "Rope" is not part of the C++ standard!
C++ Overview: http://www.cplusplus.com/reference/

Hubi
- 1,629
- 15
- 20
-
How do I find what is in the standard? I have been looking at this: https://www.sgi.com/tech/stl/download.html which does include it. – John P Aug 31 '15 at 10:58
-
1Assuming you are you using llvm with libc++, here is your implementation http://libcxx.llvm.org. And updated answer – Hubi Aug 31 '15 at 11:01
0
From the link you posted:
This distribution of the STL consists entirely of header files: there is no need to link to any library files.
This means the steps to use it are:
download the source code for SGI's STL implementation
add them to your include path
include files as necessary in your code
compile
That said, the link you posted is not the C++ standard library. It is an implementation of STL, (the precursor to the C++ standard library) with a few (non-standard) additions. In particular, the rope implementation you found is a non-standard adition.

utnapistim
- 26,809
- 3
- 46
- 82
-
That statement applies if you use the SGI compiler, which is highly unlikely that the OP is doing. – jakebower Aug 31 '15 at 13:02