tags:

views:

169

answers:

2

We're needing to write small fast code on the windows platform and I know that boost in some instances has header only implementations. These need to be small for a reason, so we've been careful not to use the std C++ libraries actually because of size.

My question is, does using boost asio or system also haul in the std C++ libraries under windows?

EDIT: Yes, small and fast. I know parts of the std c++ library are very fast if not faster than C. But, size is a factor for us as end users will download these on the fly and we dont want any major dependencies or huge downloads like pulling in MFC to use one function! We tend to use C++ like an extended version of C++. Only the objects are used, no RTTI, no IO streams.

I guess my question boils down to: Which parts of boost are likely to use the streams library? Is ASIO going to bloat my code more than just using the win32 API directly?

+4  A: 

Of course, Boost just provides a layer of abstraction. It has to use the C++ STL library at some point. If you don't believe me, just check the code.

SimpleCoder
Call it the STL or the stdlib, but please don't call it the STD library ;v)
Potatoswatter
Haha, oops. I have fixed my humorous mistake :)
SimpleCoder
[The STL is part of C++. I don't understand why people act like it is not.](http://stackoverflow.com/questions/2444514/why-do-programmers-sometimes-refer-to-c-stl-like-its-a-separate-language) It was better before the edit... +1 for what it *was*.
Billy ONeal
The C++ standard library and the "STL" are not the same thing. Certainly, parts of the SGI STL were incorporated into the C++ standard library, but it's really not at all correct to refer to the entire C++ standard library simply as the "STL." The math library, for example, is not part of the STL but is part of the C++ standard library.
James McNellis
@James: does it matter? Get Herb Sutter and Scott Meyer to stop using the term "STL" incorrectly, and then I'll concede that it might be worth preaching to SO users as well. But until then, it's just a "I'm more pedantic than you" kind of showboating. The STL does not, in practical terms, if you ask a C++ programmer, refer to the SGI library, but rather to the subset of the C++ standard library that was derived from said SGI lib.
jalf
@SimpleCoder: Boost doesn't *have* to use the STL at all. It's convenient to do so, but certainly not necessary. They could have used the C standard library, or even relied on OS-specific functionality and provide everything themselves.
jalf
@jalf: No, I agree with you completely; I have no objection at all to using "STL" to refer to the subset of the C++ standard library that was derived from the SGI STL. Referring to the entire C++ standard library as "the STL" is not really correct. Referring to the pieces of it that came from the SGI STL or are based on the design patterns from the STL (so, the containers, iterators, algorithms, etc.) as the "STL" is just fine, in my opinion (and I think it's good, because it provides a good, short name under which to categorize all of those related pieces of the standard library).
James McNellis
@James: Oh right then. :) Sorry for the misunderstanding then. :)
jalf
@jalf: No problem :-) (heh; I just read your quite passionate blog entry about this subject; very nice :-D)
James McNellis
+1  A: 

Boost may well use STL or other C++ standard libraries, but I think your best bet is not to be biased against that but just to try including ASIO or whatever it is you need and see if your compiled/optimized module is still small enough to meet your requirements.

You mentioned "small and fast" as if the STL wasn't small or fast, but it is pretty tight in both ways, maybe it will still meet your requirements -- it was designed to be incredibly efficient...

Scott Stafford