Require C++11/dropping Boost fallback

Hi,

I wanted to test the room on requiring C++11 in Avogadro 2. We have
optional fallback to Boost right now, and some macros to make things
work for the limited subset of C++11 we use. We cannot really take
advantage of things like auto, lambdas, and move constructors easily.
There are also things like atomics, threading features and regex.

With things like docker containers, and the fact that Windows has
Visual Studio 2013 community (not sure Open Babel compiles there yet,
but we should be able to help) are there good reasons to stay away
from a hard requirement of C++11? I think if we continue the current
pattern we have to use new features in fairly limited forms (made
sense in 2011, not sure it does in 2015).

Thoughts?

Marcus

I think the question would be about C++11 support in GCC and the versions of GCC available in different distributions. IIRC, 4.8 was the first version to have fairly complete C++11 support?

-Geoff


Prof. Geoffrey Hutchison
Department of Chemistry
University of Pittsburgh
tel: (412) 648-0492
email: geoff.hutchison@gmail.com
web: http://hutchison.chem.pitt.edu/

On Jun 1, 2015, at 6:32 PM, Marcus D. Hanwell mhanwell@gmail.com wrote:

Hi,

I wanted to test the room on requiring C++11 in Avogadro 2. We have
optional fallback to Boost right now, and some macros to make things
work for the limited subset of C++11 we use. We cannot really take
advantage of things like auto, lambdas, and move constructors easily.
There are also things like atomics, threading features and regex.

With things like docker containers, and the fact that Windows has
Visual Studio 2013 community (not sure Open Babel compiles there yet,
but we should be able to help) are there good reasons to stay away
from a hard requirement of C++11? I think if we continue the current
pattern we have to use new features in fairly limited forms (made
sense in 2011, not sure it does in 2015).

Thoughts?

Marcus



Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-devel

On Wed, Jun 3, 2015 at 11:47 AM, Geoffrey Hutchison
geoff.hutchison@gmail.com wrote:

I think the question would be about C++11 support in GCC and the versions of GCC available in different distributions. IIRC, 4.8 was the first version to have fairly complete C++11 support?

For Linux GCC 4.7 had most (probably everything we would use soon),
http://wiki.apache.org/stdcxx/C%2B%2B0xCompilerSupport but there are a
few things that were missing. Windows we would ideally move to Visual
Studio 2013 or later due to the community edition release and C++11
support, and Clang has been good since 3.0/3.1.

Ubuntu 14.04 LTS (last LTS release) was GCC 4.8.2, it looks like
Debian stable is back on GCC 4.7.2. Many have backports/methods for
getting modern clang/gcc searching the web. The Linux situation seems
reasonable, KDE frameworks require GCC 4.5+ and have the following
policy,

https://community.kde.org/Frameworks/Policies#Frameworks_compiler_requirements_and_C.2B.2B11

I think 4.7 would give us a fair chunk more, along with clang 3.1.
Quite a few libraries made the leap a while back. There are of course
others who haven’t, but I would hate to go to a lot of extra effort
for an audience that does not exist. Android NDK even seems to have
C++11 support in the Clang toolchain.

Marcus

On Wed, Jun 03, 2015 at 12:05:59PM -0400, Marcus D. Hanwell wrote:

Ubuntu 14.04 LTS (last LTS release) was GCC 4.8.2, it looks like
Debian stable is back on GCC 4.7.2.

Debian stable (jessie) ahs GCC 4.8 and 4.9, but it got released very
recently and many are still on oldstable (wheezy) with GCC 4.7.

Michael

Debian stable (jessie) ahs GCC 4.8 and 4.9, but it got released very
recently and many are still on oldstable (wheezy) with GCC 4.7.

I guess your impression agrees with Marcus - that “probably everything we would use soon” is fine and we can target anything supported by GCC 4.7.x.

-Geoff

On Wed, Jun 03, 2015 at 01:20:01PM -0400, Geoffrey Hutchison wrote:

Debian stable (jessie) ahs GCC 4.8 and 4.9, but it got released very
recently and many are still on oldstable (wheezy) with GCC 4.7.

I guess your impression agrees with Marcus - that “probably everything
we would use soon” is fine and we can target anything supported by GCC
4.7.x.

As far as important Debian/Ubuntu releases are concerned, yes, (if 4.7
really implements all the features), RHEL/CentOS/SL 6 might be an
important target as well (or not, dunno), and AFAIK it only ships GCC
4.4 (but might have some C++ features backpatched).

Michael

On Wed, Jun 3, 2015 at 6:50 PM, Michael Banck mbanck@debian.org wrote:

On Wed, Jun 03, 2015 at 01:20:01PM -0400, Geoffrey Hutchison wrote:

Debian stable (jessie) ahs GCC 4.8 and 4.9, but it got released very
recently and many are still on oldstable (wheezy) with GCC 4.7.

I guess your impression agrees with Marcus - that “probably everything
we would use soon” is fine and we can target anything supported by GCC
4.7.x.

As far as important Debian/Ubuntu releases are concerned, yes, (if 4.7
really implements all the features), RHEL/CentOS/SL 6 might be an
important target as well (or not, dunno), and AFAIK it only ships GCC
4.4 (but might have some C++ features backpatched).

Closing the loop on this, I feel pretty comfortable in bumping this. I
think tagging before making a hard dependency on C++11 features would
be good in case people wanted that, but see no reason not to start
using modern C++ functionality.

Compiler support seems reasonable, building new compilers on older
machines is also possible, I know Ubuntu 12.04 still has a few years
of support left and that may present some issues but there is already
a new LTS people can move to (I think they get five years).

Marcus