-
- Downloads
There was a problem fetching the pipeline summary.
[array.hh] Deprecate Dune::array and helpers.
This deprecates the header `<dune/common/array.hh>` and all of its members. - `Dune::array`: use `std::array` instead. - `Dune::make_array()`: use `Dune::Std::make_array()` instead. - `Dune::fill_array()`: use `Dune::filledArray()` instead. Note that deprecation warnings for `array` and `make_array` could not be implemented, since those were implemented by using declarations and it seems to be impossible to deprecate those. Users should still get a note though since the entire header is deprecated. For `fill_array()` there was no replacement, so this commit introduces `filledArray()` with a slightly improved calling syntax, a better name, and (in C++17) support for `constexpr` arrays. To make it possible to deprecate `array.hh`, that replacement is in its own header `filledarray.hh`. This commit also introduces two unit tests: - `filledarraytest.cc` to test `filledArray()`, and - `arraydeprecationtest.cc` to make sure the deprecation syntax is supported for all tested compilers. (It also has a feature to check that deprecation warnings are really displayed, but that is disabled for regular unit testing since the logs have to be checked manually for the warnings.)
Showing
- dune/common/CMakeLists.txt 1 addition, 0 deletionsdune/common/CMakeLists.txt
- dune/common/array.hh 18 additions, 0 deletionsdune/common/array.hh
- dune/common/filledarray.hh 44 additions, 0 deletionsdune/common/filledarray.hh
- dune/common/test/CMakeLists.txt 4 additions, 0 deletionsdune/common/test/CMakeLists.txt
- dune/common/test/arraydeprecationtest.cc 40 additions, 0 deletionsdune/common/test/arraydeprecationtest.cc
- dune/common/test/filledarraytest.cc 39 additions, 0 deletionsdune/common/test/filledarraytest.cc
dune/common/filledarray.hh
0 → 100644
dune/common/test/arraydeprecationtest.cc
0 → 100644
dune/common/test/filledarraytest.cc
0 → 100644
-
mentioned in commit 88333374
-
mentioned in merge request !368 (merged)
Please register or sign in to comment