c++11 and gcc 4.7

Hi, I am attempting to do a cost benefit analysis to justify adopting the subset of C++11 that is supported by gcc 4.7. I believe there is a strong case for doing so from just the minor features and library improvements. However, I am having a hard time putting together a convincing cost benefit analysis (actually I would like to be able to do this with parts of boost too - any help with this would be great). I have many subjective arguments for boost, C++11 and TR1 but am tasked with trying to justifying any change in terms of costs and benefits. One of Boost's roles is to fill in gaps in c++ support where compiler vendors have not yet provided an implementation. I know that g++4.7 has incomplete support for multi-threading but it is unclear whether this is in the core language area and/or library area and what platforms it applies to. I am specifically interested in GNU/Linux. The status of boost for gcc4.7 is unclear (I know it has not been officially released yet but the status for gcc 4.6.2 is also unclear). Both of the following links from www.boost.org are several years and versions out of date http://www.boost.org/doc/libs/1_34_0/status/compiler_status.html http://boost.sourceforge.net/regression-logs/ Will boost.thread work as a drop in replacement for std::thread or is anything missing or broken on the core language side? (On the gcc side I am also interested in whether std::thread is a sufficiently complete implementation of the standard that boost.thread might not be necessary). The answer to this question may make my work harder. I was asked to justifiy either TR1, some part of boost or C++11 as my preference. I opted for C++11 as the most useful. I would probably have to justify boost libraries on a case by case basis. Justifying use of C++11 actually amounts to justifying a compiler upgrade + possibly training + possibly boost.thread As threads are one of the biggest features of c++11, I may be asked to justify just boost.thread vs gcc 4.7 + boost.thread. Surprisingly another thing that is unclear is the exact set of boost libraries that were included in C++11. I don't have either the standard (other than the February draft http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf) or a good summary of the standard to hand. Suprisingly neither the boost website nor the g++ page have a list either, though the following two links are helpful: http://www.boost.org/doc/libs/1_48_0/?view=filtered_std-tr1 http://www.boost.org/doc/libs/1_48_0/?view=filtered_std-proposal I found a reference somewhere online (that I can no longer find) claiming, I believe incorrectly, that boost file_system is in C++11. This isn't mentioned on: http://www.boost.org/doc/libs/1_48_0/libs/filesystem/v3/doc/index.htm But nor its is presence in the 2005 "TR2" proposal. I worry that the 2005 TR2 proposal may be confused with any real TR2 proposal following on from C++11. I note that boost.chrono claims to be implemnting C++11 but I would have thought it was other way around and that the boost library was incorporated into the standard. http://www.boost.org/doc/libs/1_48_0/doc/html/chrono.html Anyway, the closest I've come to a list of libraries in C++11 outside of n3242 is: http://www2.research.att.com/~bs/C++0xFAQ.html#library Regards, Bruce.

On Tue, Dec 6, 2011 at 2:08 PM, Bruce Adams <tortoise_74@yahoo.co.uk> wrote: ...
The status of boost for gcc4.7 is unclear (I know it has not been officially released yet but the status for gcc 4.6.2 is also unclear).
Both of the following links from www.boost.org are several years and versions out of date
http://www.boost.org/doc/libs/1_34_0/status/compiler_status.html
Those links are years and years out of date. You should be looking at the daily regression tests. See http://beta.boost.org/development/testing.html In particular, http://beta.boost.org/development/tests/release/developer/summary.html http://beta.boost.org/development/tests/trunk/developer/summary.html ...
Surprisingly another thing that is unclear is the exact set of boost libraries that were included in C++11.
All of TR1 except special math functions went into C++11. Some other new C++11 library features, like enable_if, were based at least vaguely on boost libraries. Use of boost libraries has become an accepted practice, and it is now widely known that many libraries from boost are on a track to become part of the C++ standard or its TRs. So there is less interest in keeping a scorecard. ...
I found a reference somewhere online (that I can no longer find) claiming, I believe incorrectly, that boost file_system is in C++11.
That isn't correct. Filesystem is on track for C++next, but we won't know for another couple of months whether that means TR2 or a version of the standard itself.
I note that boost.chrono claims to be implemnting C++11 but I would have thought it was other way around and that the boost library was incorporated into the standard.
The Boost Chrono docs are correct. The design of std chrono was influenced by Boost Date-Time, and a number of boost people were involved in chrono's development, but it wasn't a boost library. --Beman

Le 06/12/11 20:08, Bruce Adams a écrit :
Hi, I am attempting to do a cost benefit analysis to justify adopting the subset of C++11 that is supported by gcc 4.7. I believe there is a strong case for doing so from just the minor features and library improvements. However, I am having a hard time putting together a convincing cost benefit analysis (actually I would like to be able to do this with parts of boost too - any help with this would be great).
The status of boost for gcc4.7 is unclear (I know it has not been officially released yet but the status for gcc 4.6.2 is also unclear).
AFAIK, 4.6.2 was released.
Will boost.thread work as a drop in replacement for std::thread or is anything missing or broken on the core language side? (On the gcc side I am also interested in whether std::thread is a sufficiently complete implementation of the standard that boost.thread might not be necessary).
Not now. Boost.Thread was developed in parallel to the Thread standard definition, but there are a lot of missing features and differences in the syntax. If you have to work only with gcc I belive you should use the c++11 library version.
The answer to this question may make my work harder.
I was asked to justifiy either TR1, some part of boost or C++11 as my preference. I opted for C++11 as the most useful. I would probably have to justify boost libraries on a case by case basis.
Justifying use of C++11 actually amounts to justifying a compiler upgrade + possibly training + possibly boost.thread
As threads are one of the biggest features of c++11, I may be asked to justify just boost.thread vs
gcc 4.7 + boost.thread.
Just move to gcc 4.7.
Surprisingly another thing that is unclear is the exact set of boost libraries that were included in C++11.
Most of the ones appering in Boost.TR1 + Thread + Chrono
I don't have either the standard (other than the February draft http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf) or a good summary of the standard to hand.
This is a quite good approximation.
Suprisingly neither the boost website nor the g++ page have a list either, though the following two links are helpful:
http://www.boost.org/doc/libs/1_48_0/?view=filtered_std-tr1
http://www.boost.org/doc/libs/1_48_0/?view=filtered_std-proposal
I found a reference somewhere online (that I can no longer find) claiming, I believe incorrectly,
that boost file_system is in C++11.
No. FileSystem will be surely proposed to the standard committee soon.
But nor its is presence in the 2005 "TR2" proposal. I worry that the 2005 TR2 proposal may be confused with any real TR2 proposal following on from C++11.
Proposal are just proposal ;-)
I note that boost.chrono claims to be implemnting C++11 but I would have thought it was other way around and that the boost library was incorporated into the standard.
No. Boost.Chrono was based on the standard draft proposal of Howard Hinnant. Best, Vicente
participants (3)
-
Beman Dawes
-
Bruce Adams
-
Vicente J. Botet Escriba