Jump to content
  • Advertisement
Sign in to follow this  
paulecoyote

[C++] Do you use Boost?

This topic is 4801 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been looking at Boost library, particularly the implementation of multidimensional arrays: http://www.boost.org/libs/multi_array/doc/user.html I was contemplating using a nested vector, but this quote caught my eye:
Quote:
Boost MultiArray is a more efficient and convenient way to express N-dimensional arrays than existing alternatives (especially the std::vector<std::vector<...>> formulation of N-dimensional arrays).
... being better then the stl is quite a bold claim. But the examples seem compelling. The licence seems pretty unrestrictive too. I'm looking for developers comments whom have actually used the library and if they like it or not, or had any problems. Thanks, Paul

Share this post


Link to post
Share on other sites
Advertisement
I've not used MultiArray but boost is useful. I've found boost::smart_ptr, function, bind, thread and signals very helpful.

Most C++ programmers know the library and its classes are almost a standard way to do things, in a similar way to the STL. If you're going to write something from scratch its best to check boost for something that fits your needs first.

Share this post


Link to post
Share on other sites
The Boost libraries are widely used and quite well regarded. A fair number of the Boost libraries are currently under review for being added as part of the official C++ standard, so they'd actually become part of the STL. Their multi-dimentional array would be more efficient than the vector of vectors solution, because a vector of vectors has an extra pointer to dereference, while a true multidimentional array would not.

Personally, I have yet to use one of the Boost libraries, but I don't expect that to last long. I'm familiar with the libraries they offer, and when I encounter a problem where I feel one of their libraries would be of benefit, I'll use it, unless I have some reason for wanting to implement it myself.

Share this post


Link to post
Share on other sites
I haven't used multiarray, but I use other boost libraries all the time. Many boost libraries should be a part of C++ standard and some possibly will be in the future. The STL is quite limited in many ways and boost patches up many of the holes in it.

As an added bonus, many boost libraries are header only, so you don't even have to worry about linking to the library, which can be useful if you're working on a multiplatform project.

Share this post


Link to post
Share on other sites
Quote:
Original post by Lord Maz
Still haven't got boost to install correctly, but I would use it if I could.


Use bjam -sTOOLS=mingw [libname] on MinGW. There are different settings depending on your compiler and platform

Share this post


Link to post
Share on other sites
Quote:
Original post by Lord Maz
Still haven't got boost to install correctly, but I would use it if I could.


The installation does seem to have many steps - I've downloaded it and will use it if there is a bigger need. The exe extractor didn't work for me so I've downloaded the zip.

For the moment the yucky embedded vector solution is alright... if it annoys me further I'll use boost.

Share this post


Link to post
Share on other sites
I recommend/use boost::spirit, boost::thread, boost::lambda, phoenix, boost::lexical_cast, boost::shared_ptr (occasionally), boost::filesystem and boost::datetime. All of them are excellent libraries. There aren't a great deal of [good] portable c++ threading libraries around, you know.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!