Nektar++ transition to C++11
Dear all, As part of our ongoing efforts to modernise our codebase, we are planning to transition to the C++11 standard in the near future. A consequence of this is that you will in future require a compiler which supports the C++11 standard (either as an option, such as --std=c++11, or by default). Current versions of popular compilers all fully support the standard, but older compilers may only have partial support. We recommend the following compiler versions to minimise the likelihood of problems going forward: - GCC: 4.8 or later - Clang: 3.3 or later - MSVC: 19.0 or later - Intel: 15.0 or later - PGI: 2015 or later We encourage users to test out support for basic C++11 by compiling the branch 'feature/libutils-c++11' from the code repository and updating build scripts and configuration as necessary. Please let us know if you have any problems or concerns. We will be making the transition after the Nektar++ Workshop in mid-June. Cheers, Nektar++ Development Team
Dear all, Just to follow up on this, the latest master (as of merge request !767 or changeset 7702eef3) now incorporates some light C++11 in the core LibUtilities classes, as well as removing our dependency on Loki. Although this is passing all of our buildbot tests, if you do encounter any issues, let us know. A second merge request (!795) with far more extensive modifications is currently under development, so I will email again to let you know when this is ready to test/has been merged into master. Thanks, Dave
On 24 Apr 2017, at 11:03, Chris Cantwell <c.cantwell@imperial.ac.uk> wrote:
Dear all,
As part of our ongoing efforts to modernise our codebase, we are planning to transition to the C++11 standard in the near future.
A consequence of this is that you will in future require a compiler which supports the C++11 standard (either as an option, such as --std=c++11, or by default).
Current versions of popular compilers all fully support the standard, but older compilers may only have partial support. We recommend the following compiler versions to minimise the likelihood of problems going forward: - GCC: 4.8 or later - Clang: 3.3 or later - MSVC: 19.0 or later - Intel: 15.0 or later - PGI: 2015 or later
We encourage users to test out support for basic C++11 by compiling the branch 'feature/libutils-c++11' from the code repository and updating build scripts and configuration as necessary.
Please let us know if you have any problems or concerns. We will be making the transition after the Nektar++ Workshop in mid-June.
Cheers, Nektar++ Development Team
Dear all, As a further followup, MR 795 has now been merged, which adds a lot more C++11 functionality. The important things you need to consider for your own development practices are the following: * Many boost classes have been replaced by native C++11 equivalents, including: shared_ptr, weak_ptr, unordered_map, unordered_set, tuple, bind and function. * Most of the iterator typedefs, which were mostly there to make life a bit easier, have been removed since we now have the `auto' keyword which allows the compiler to infer the appropriate datatype. As an example: StdRegions::VarCoeffMap::iterator myIter = someMap.begin(); can be replaced by auto myIter = someMap.begin(); * Finally, in light of the above, we've also replaced most iterators with range-based for loops. Consider the following snippet, which is not uncommon within the code: set<StdRegions::StdExpansionSharedPtr> someSet; set<StdRegions::StdExpansionSharedPtr>::iterator it; for (it = someSet.begin(); it != someSet.end(); ++it) { int numFaces = (*it)->GetNumFaces(); } The range-bases for loop allows us to translate this to a more readable (and more 80-character width friendly): set<StdRegions::StdExpansionSharedPtr> someSet; for (auto &it : someSet) { int numFaces = it->GetNumFaces(); } The use of the features above, as well as any other C++11 features you find helpful in development, is strongly encouraged! Many thanks, Dave
On 29 Jun 2017, at 10:13, David Moxey <d.moxey@imperial.ac.uk> wrote:
Dear all,
Just to follow up on this, the latest master (as of merge request !767 or changeset 7702eef3) now incorporates some light C++11 in the core LibUtilities classes, as well as removing our dependency on Loki. Although this is passing all of our buildbot tests, if you do encounter any issues, let us know.
A second merge request (!795) with far more extensive modifications is currently under development, so I will email again to let you know when this is ready to test/has been merged into master.
Thanks,
Dave
On 24 Apr 2017, at 11:03, Chris Cantwell <c.cantwell@imperial.ac.uk> wrote:
Dear all,
As part of our ongoing efforts to modernise our codebase, we are planning to transition to the C++11 standard in the near future.
A consequence of this is that you will in future require a compiler which supports the C++11 standard (either as an option, such as --std=c++11, or by default).
Current versions of popular compilers all fully support the standard, but older compilers may only have partial support. We recommend the following compiler versions to minimise the likelihood of problems going forward: - GCC: 4.8 or later - Clang: 3.3 or later - MSVC: 19.0 or later - Intel: 15.0 or later - PGI: 2015 or later
We encourage users to test out support for basic C++11 by compiling the branch 'feature/libutils-c++11' from the code repository and updating build scripts and configuration as necessary.
Please let us know if you have any problems or concerns. We will be making the transition after the Nektar++ Workshop in mid-June.
Cheers, Nektar++ Development Team
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
participants (2)
- 
                
                Chris Cantwell
- 
                
                David Moxey