[C++] Do you use Boost?

Started by
24 comments, last by Baraclese 18 years, 10 months ago
Just want to mention that Boost is no ordinary 3rd-party library members of boost have either close ties with or are part of the C++ standards committee. 10 Boost libraries are already being reviewed in the library technical report (TR1) some compilers already implement most or all of std::tr1.

Anyways the point of Boost is to compensate for flaws in the current C++ standard and useful cross-platform componenets that are not in the C++ standard library.

For example the standard library binders are broken and i don't mean implementation wise i mean in the standard they are broken. boost::bind is replacement that goes well beyond the capabilities of the standard library binders.

[Edited by - snk_kid on June 23, 2005 3:54:16 AM]
Advertisement
Quote:Original post by iMalc
I'm sure that it's multidimensional array is great, though I'm also very capable of writing my own too, or using other existing tools.


Just try it ;) I have several pieces of such an implementation lying around and well, I've learned a fair bit but haven't found the motivation yet to pull it all together.

Quote:... being better then the stl is quite a bold claim.


Boost::multi_array isn't claiming to be "better than the STL"; it's claiming to be better for a particular purpose than a particular common STL-using implementation (nested std::vectors). In particular, when you nest std::vectors like that to build what is supposed to be a rectangular array, you end up writing the code yourself to make sure it stays rectangular - and you have a std::vector object's overhead "per row" (and it's even worse in 3+ dimensional cases) which is useless (specifically because you *do* want it to stay rectangular). A smart implementation holds a single block of memory that gets resized as needed, and does arithmetic in order to translate a set of array indices into a single index.

For example, my implementation uses a single std::vector underneath the hood for storage, and creates objects representing "x-dimensional views" (for x in 1..N) of the storage; operator[] returns an (x-1)-dimensional view object, except in the x=1 case which is specialised to return the element type. Or at least, that's how I intend it to work if I ever finish it :)
GameDev.net is a game deveoper site, right?
So, the question should perhaps be:
"Do you use boost in your published games or game engines?".
The answer to that is probably NO!
The same goes, to a lesser extent, to STL.

// Riddick B Riddick
/ Bucko aka Backman
Quote:Original post by Bucko
"Do you use boost in your published games or game engines?".
The answer to that is probably NO!
The same goes, to a lesser extent, to STL.


I hope that wasn't your answer to the question or was that meant to reflect what you think most people would say?

Also there is no such thing as STL only standard library.

Honestly that is just being ignorant, use both where ever its appropriate and use it effectively, the last thing we need is more custom mediocre versions of std::list or boost::function/std::tr1::function etc. I would love to see how far you would get trying to write your own version of boost::mpl.

i've used the standard library and boost in my own works, at the appropriate places and used it effectively had no issues, it was efficient, it saved me from wasting time on unnecessary things, it made my code clear & concise. Would i use it again? yes.
Quote:Original post by Urxae
Quote:Original post by Lord Maz
Still haven't got boost to install correctly, but I would use it if I could.
Quote:Original post by Lord Maz
I am using mingw (the version that comes with dev-c++) but calling bjam and including the root path gives me a couple of hundred errors. It nags alot about VC++ mumbo-jumbo - maybe because I'm also using the VC++ compiler?


I had the same problem (without VC++ installed even), and ignored boost for a while. Later (a few months ago) when I really wanted some of the stuff in there, I googled around for a few hours and found an obscure post on one of the boost mailing lists by someone with the same problem (I think posted in 2004, not sure).
They never actually found out what the problem was, but it turned out that compiling it from MSYS (available from the MinGW site if you haven't installed it yet, it's optional) was a workaround. Works for me, but I'm not really happy about all the time it cost me to find out about it [headshake]. Hope this helps.


Thanks, I tried it now but it wasn't any different. Not sure if I used it correctly, however...
-Lord Maz-
I use:
boost::multi_index
boost::function
boost::iostreams
boost::serialization
boost::mpl
boost::preprocessor
boost::unit_test
boost::bind
boost::shared_ptr

This topic is closed to new replies.

Advertisement