Skip to content

Commit

Permalink
Add instructions for std:: scope resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl authored and speth committed Aug 4, 2023
1 parent fe67a19 commit c9a6f81
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -98,9 +98,14 @@
* Do not indent the contents of namespaces
* Code should follow the C++17 standard, with minimum required compiler versions
GCC 7.0, Clang 4.0, MSVC 14.14 (Visual Studio 2017 version 15.7) and Intel 19.0.
* Cantera moves frequently used C++ standard namespace types and functions into the
declarative region, meaning that the `std` scope resolution can be omitted. This
applies to the following: `string`, `vector`, `map`, `set`, `pair`, `shared_ptr`,
`make_shared`, `unique_ptr`, `make_unique` and `function`. Example: use `string`
instead of `std::string`; a `using namespace std;` declaration is not required.
* Avoid manual memory management (that is, `new` and `delete`), preferring to use
standard library containers, as well as `std::unique_ptr` and
`std::shared_ptr` when dynamic allocation is required.
standard library containers, as well as `unique_ptr` and `shared_ptr` when dynamic
allocation is required.
* Portions of Boost which are "header only" may be used. If possible, include
Boost header files only within .cpp files rather than other header files to
avoid unnecessary increases in compilation time. Boost should not be added
Expand Down

0 comments on commit c9a6f81

Please sign in to comment.