How much of Boost do you use?

Started by
20 comments, last by Dynamo_Maestro 10 years, 12 months ago

GCC 4.2.1 is pretty old, isn't it? It seems most C++11 features began in gcc 4.3, and only really started getting the cool features around 4.5.

Right you are - I didn't look at the version. If you upgrade XCode (and/or OS X itself) you should have C++11.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Advertisement

I was under the impression that the latest version of Xcode (4?) only worked on Lion. I'm still on Snow Leopard and I'm not in a position to upgrade right now. I'll see if I can upgrade Xcode itself (I just grab it off App Store, right?).

Update

Upgrading Xcode on my current machine is no go. I get "Xcode can't be installed on Macintosh HD because Mac OS X version 10.7.4 or later is required" when I click the "Free" button on Xcode's App Store page.

I was under the impression that the latest version of Xcode (4?) only worked on Lion. I'm still on Snow Leopard and I'm not in a position to upgrade right now. I'll see if I can upgrade Xcode itself (I just grab it off App Store, right?).

Update

Upgrading Xcode on my current machine is no go. I get "Xcode can't be installed on Macintosh HD because Mac OS X version 10.7.4 or later is required" when I click the "Free" button on Xcode's App Store page.

Yup, that rather stinks. The upgraded compiler is quite worth it but if you can't use it, nothing to do for that. That old of a GCC, you probably don't have much C++11 available so Boost may be your best bet.

Upgrading Xcode on my current machine is no go. I get "Xcode can't be installed on Macintosh HD because Mac OS X version 10.7.4 or later is required" when I click the "Free" button on Xcode's App Store page.

While that is correct, it isn't the entire story.

Apple did produce XCode 4.2 for Snow Leopard, and if you can find a late-edition 10.6.8 install disk, it contains a valid Snow Leopard installer for XCode 4.2. Unfortunately, in an effort to force Snow Leopard users to upgrade, they only offer the download for Lion and Mountain Lion.

(though, in all fairness, the OS upgrade is only $30)

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

(though, in all fairness, the OS upgrade is only $30)

Unless of course your machine doesn't include a 64bit capable BIOS, or whatever OsX calls it. This pissed me off a lot unfortunately, my older mac pro desktop and a laptop can not run ML due to being "too old". Even though the CPU's are fully 64bit compatible, a small bit is 32bit only and as such ML is off limits. :( The laptop wasn't a big issue as the space bar doesn't work so well and I love the air as my replacement, the desktop pissed me off a lot though as it was a big expensive dual box with reasonably new CPU's, just because of one piece though, no ML allowed.

(though, in all fairness, the OS upgrade is only $30)

Unless of course your machine doesn't include a 64bit capable BIOS, or whatever OsX calls it. This pissed me off a lot unfortunately, my older mac pro desktop and a laptop can not run ML due to being "too old". Even though the CPU's are fully 64bit compatible, a small bit is 32bit only and as such ML is off limits. sad.png The laptop wasn't a big issue as the space bar doesn't work so well and I love the air as my replacement, the desktop pissed me off a lot though as it was a big expensive dual box with reasonably new CPU's, just because of one piece though, no ML allowed.

I don't know what exactly you have or what this guide covers (I haven't read all of it), but maybe this guide/forum topic will help you: http://forums.macrumors.com/showthread.php?t=1325709

At the moment I only use FileSystem, just because it is so easy to use on multiple platforms. Other parts of Boost I did not yet look at. (neither to the new c++11 features...)

shared_ptr, foreach, filesystem... when I arrived here at $WORKPLACE and discovered bind and function are banned because they make C++ 'too functional', I couldn't write compileable code for weeks... how do people do anything without bind??

Looked at spirit. Very quickly looked away...

I don't use boost at all actually. It's not that I'm avoiding it, I have the entire library downloaded and compiled, and I regularily look at what boost can do for me when I have a problem, but so far I simply haven't found a use for it. I also already have a large code base that does not use it; for a new project I'd probably use it more.

A few reason I'm not using it:

I was interested in boost's testing framework for a while, but there is one that's fully integrated into Visual Studio 2012 and Microsoft is at work to improve support for tests as much as possible, so I passed on boost::test.

I wanted to use boost::format because I thought it had better support for thousand separators (in the std library it's absurdly complicated, you have to swap locales for this to work) but later, the documentation says that %' support is not guaranteed. The design is kind of cool though, I might change my mind on that one.

I rarely use smart pointers, and when I do, the ones of the standard library are enough for me.

Boost uses a lot of templates. I love templates as much as they do, but right now I'm writing a DLL library, and templated types in exported class declarations can cause some issues when linked to code compiled with different compilers (exceptions have the same problem although). I want my library to support multiple compilers, so it's going to be a problem for me if I start using boost types as class attributes or in structs.

My Boost usage list is:

filesystem, bind, signals2, format, any, lexical_cast.

Especially boost::signals2 is worth praising in my opinion. It's great to use signals to make decoupled systems talk to each other on occasion. You surely don't want to connect/disconnect thousands of times per frame, but calling through it is pretty fast.

Previously on boost, now deprecated due to C++11:

scoped_ptr, shared_ptr, unordered_map, random

I'm going to remove any at some point in the future, though, because I want an implementation of any that does not allocate for small types.

----------
Gonna try that "Indie" stuff I keep hearing about. Let's start with Splatter.

This topic is closed to new replies.

Advertisement