-
Notifications
You must be signed in to change notification settings - Fork 227
Description
I'd like to start a discussion about moving to the newer standard. Among other things it would definitely make some of the internals clearer than they are now. What do you think about it?
One solution would be to simply announce that Geometry drops the support for older compilers. We should also decide which C++11 features exactly we'd like to use because the support for different features was added in various versions of different compilers. I prepared a list of the most important features I think we could use and the list of 4 compilers below. I'll update it if someone suggests that additional feature is useful.
The feature I think would be the most useful is auto because it'd allow us to get rid of many very long template instantiations, typedefs, etc. So I marked the features and minimum versions of compilers based on auto feature below (so versions GCC 4.4, Clang 2.9, VS 2010, Intel C++ 11.0 and below). The youngest of these compilers is GCC 4.4 released in March 13, 2012. Of course we can relax it if needed, .e.g Rvalue references would also be useful and they are supported in the same versions besides Intel C++ which needs the next minor version. The next thing is I think lambda expressions but this would require GCC 4.5 and Clang 3.1 which basically means compilers released in and after 2012.
| Feature | GCC | Clang | MSC/MSVC/VS | Intel C++ |
|---|---|---|---|---|
| Rvalue references | 4.3 | 2.9 | 16.0/10.0/2010 | 11.1 |
| Variadic templates | 4.3 | 2.9 | 18.0/12.0/2013 | 12.1 |
| Initializer lists | 4.4 | 3.1 | 18.0/12.0/2013 | 13.0 |
| Static assertions | 4.3 | 2.9 | 16.0/10.0/2010 | 11.0 |
| auto-typed variables | 4.4 | 2.9 | 16.0/10.0/2010 | 11.0 |
| Lambda expressions | 4.5 | 3.1 | 16.0/10.0/2010 | 12.0 |
| decltype(expression) | 4.3 | 2.9 | 16.0/10.0/2010 | 11.0 |
| Null pointer constant | 4.6 | 2.9 | 16.0/10.0/2010 | 12.1 |
| Strongly-typed enums | 4.4 | 2.9 | 17.0/11.0/2012 | 13.0 |
| constexpr | 4.6 | 3.1 | 19.0/14.0/2015 | 13.0 |
| Delegating constructors | 4.7 | 3.0 | 18.0/12.0/2013 | 14.0 |
| Explicit conversion operators | 4.5 | 3.0 | 18.0/12.0/2013 | 13.0 |
| Defaulted and deleted functions | 4.4 | 3.0 | 18.0/12.0/2013 | 12.0 |
| Range-based for | 4.6 | 3.0 | 17.0/11.0/2012 | 13.0 |
| noexcept | 4.6 | 3.0 | 19.0/14.0/2015 | 14.0 |
| Type traits | 4.3 | 3.0 | 14.0/8.0/2005 | 10.0 |
See: cppreference, GCC, Clang, MSVC, Intel.
For context release dates of the compilers.
| Compiler | Release date |
|---|---|
| GCC 4.3 | Jun 27, 2011 |
| GCC 4.4 | March 13, 2012 |
| GCC 4.5 | Jul 2, 2012 |
| GCC 4.6 | April 12, 2013 |
| GCC 4.7 | June 12, 2014 |
| Clang 2.9 | April 6, 2011 |
| Clang 3.0 | December 1, 2011 |
| Clang 3.1 | May 22, 2012 |
| VS 2005 | October 2005 |
| VS 2010 | April 12, 2010 |
| VS 2012 | August 15, 2012 |
| VS 2013 | October 17, 2013 |
| VS 2015 | July 20, 2015 |
| Intel C++ 10.0 | June 5, 2007 |
| Intel C++ 11.0 | November 2008 |
| Intel C++ 11.1 | June 23, 2009 |
| Intel C++ 12.0 | November 7, 2010 |
| Intel C++ 12.1 | September 8, 2011 |
| Intel C++ 13.0 | September 5, 2012 |
| Intel C++ 14.0 | September 4, 2013 |