-
- Downloads
Move Eigen::all,last,lastp1,lastN to Eigen::placeholders::.
These names are so common, IMO they should not exist directly in the `Eigen::` namespace. This prevents us from using the `last` or `all` names for any parameters or local variables, otherwise spitting out warnings about shadowing or hiding the global values. Many external projects (and our own examples) also heavily use ``` using namespace Eigen; ``` which means these conflict with external libraries as well, e.g. `std::fill(first,last,value)`. It seems originally these were placed in a separate namespace `Eigen::placeholders`, which has since been deprecated. I propose to un-deprecate this, and restore the original locations. These symbols are also imported into `Eigen::indexing`, which additionally imports `fix` and `seq`. An alternative is to remove the `placeholders` namespace and stick with `indexing`. NOTE: this is an API-breaking change. Fixes #2321.
Showing
- Eigen/src/Core/ArithmeticSequence.h 18 additions, 15 deletionsEigen/src/Core/ArithmeticSequence.h
- Eigen/src/Core/IndexedView.h 1 addition, 1 deletionEigen/src/Core/IndexedView.h
- Eigen/src/Core/util/IndexedViewHelper.h 42 additions, 35 deletionsEigen/src/Core/util/IndexedViewHelper.h
- Eigen/src/Core/util/SymbolicIndex.h 3 additions, 1 deletionEigen/src/Core/util/SymbolicIndex.h
- Eigen/src/plugins/IndexedViewMethods.h 2 additions, 2 deletionsEigen/src/plugins/IndexedViewMethods.h
- doc/TutorialSlicingIndexing.dox 3 additions, 2 deletionsdoc/TutorialSlicingIndexing.dox
- test/indexed_view.cpp 6 additions, 1 deletiontest/indexed_view.cpp
- test/reshape.cpp 3 additions, 0 deletionstest/reshape.cpp
- test/stl_iterators.cpp 1 addition, 0 deletionstest/stl_iterators.cpp
- test/symbolic_index.cpp 4 additions, 0 deletionstest/symbolic_index.cpp
Loading
Please register or sign in to comment