Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How well does boost use c++11?

Tags:

c++

c++11

boost

Boost is essentially a c++03 library (which stimulated the c++11 standard). I'm contemplating of using some boost libraries (those that are not implemented in c++11). If I'm using c++11, does boost compile (there may be issues with non-copyable but movable objects)? and how well is boost making use of the c++11 features (variadic templates are an obvious thing to use [by some boost libraries] instead of much of the boost MPL)? (I couldn't find this amongst the boost FAQ).

like image 457
Walter Avatar asked Nov 28 '12 15:11

Walter


2 Answers

Boost is moving towards using C++11 features.

But one thing to remember is that boost is not "a library", but rather a collection of libraries. Some of them (for example boost::array) probably won't ever be updated to use many c++11 features. Why should it, when you have std::array in the standard (which was based on boost::array?)

On the other hand, Boost would like to remain useful for people who are still using C++03.

Note: Even though I write as if "Boost" is some monolithic entity, there are lots of people who contribute to boost and they have many different opinions. ;-)

To see how well various boost libraries work with C++11 compilers, you can check out the Boost Testing web page.

like image 174
Marshall Clow Avatar answered Nov 09 '22 09:11

Marshall Clow


C++11 was made do be as backwards compatible as possible. Unless boost is using reserved keywords that are new to C++11, there is no reason I know of why it shouldn't compile just fine with the new standard.

like image 25
eestrada Avatar answered Nov 09 '22 11:11

eestrada