tags:

views:

370

answers:

4

What benefits do I get from Apache C++ standard library that I don't get from STL implementations that come with the compiler and from Boost libraries?

+1  A: 

Apache C++ library was originally a commercial library from Rogue Wave. They claim to be tracking the C++ standard very closely and working hard to insure portability across various operating systems and compilers. The Rogue Wave library claimed to have been ported to over 40 compilers.

Dwight Kelly
+3  A: 

One of the advantages that stdxx claims seems to be true to me:

  • Optimized for fast compiles and extremely small executable file sizes

In this paper, Stroustrup talks about a new idea applied in some C++ compilers called SCARY. I first read about it in one of his papers. Anyway, this feature allows reducing produced executables size by a great amount (~1x - ~25x), and faster by (~1.2x - ~2.1x). In the first paper, he said that Rogue Wave STL supports SCARY, at least in modern implementations:

The most recent version of Rogue Wave STL has independent container iterators in its production mode, but some of the standard containers’ iterators are not independent in debug mode. N2911 explains that these dependencies are not actually required for debugging purposes and can easily be removed.

So, if stdxx is based on Rogue Wave STL, it might have this idea implemented already.

AraK
stdxx was forked in 2005; the SCARY paper is much more recent.
MSalters
+2  A: 

The Apache C++ Standard Library project is a complete implementation of the ISO/IEC 14882 C++ Standard Library.

The most distinguishing characteristic of this implementation of the C++ Standard Library is its portability to a large number of C++ compilers, operating systems, and hardware architectures.

Sounds like if you value extreme portability this is for you. If you don't, most everyone defaults to their compiler's default implementation, so if you ever have trouble, the community will be bigger. If you don't run into implementation issues I don't see why it should make much of a difference.

I typically get flamed for this opinion but I like the idea of having a company I can pay to fix problems, my developers (and I) aren't smart enough (or don't have the time) to dive into internals and fix bugs.

Dustin Getz
A: 

I am not familiar with the Apache C++ Standard Library, so I'm not sure what facilities it has. If you find that it provides everything that you need, then there is not much of a difference using that or using another STL implementation alongside Boost. However, Boost provides a lot more than some TR1 features and little things like smart pointers. It also has:

  1. Lambdas/Closures
  2. Template and preprocessor metaprogramming
  3. Signals and slots/Observer/Listener pattern implementation
  4. Reference wrappers
  5. A lot of other random things you're not likely to find elsewhere in a single library

It all depends on the facilities that you need.

blwy10