#1204 Make Implementations Non-Template Template Arguments of Intersection and IntersectionIterator
Metadata
Property | Value |
---|---|
Reported by | Martin Nolte (nolte@mathematik.uni-freiburg.de) |
Reported at | Oct 25, 2012 19:10 |
Type | Discussion |
Version | 2.2 |
Operating System | Unspecified / All |
Last edited by | Martin Nolte (nolte@mathematik.uni-freiburg.de) |
Last edited at | Jan 10, 2013 15:18 |
Closed by | Martin Nolte (nolte@mathematik.uni-freiburg.de) |
Closed at | Jan 10, 2013 15:18 |
Closed in version | Unknown |
Resolution | Implemented |
Comment |
Description
I had hoped to write only one native grid view for GeometryGrid, templatized directly with the grid and the host grid view.
Unfortunately, this turned out impossible. One reason for this are the template argument lists of the Intersection / IntersectionIterator facades. They look as follows:
template<class GridImp, template class IntersectionImp> class Intersection;
template<class GridImp, template class IntersectionIteratorImp, template class IntersectionImp> class IntersectionIterator;
So, the intersection has to find out what host intersection to use based solely on the type of grid - impossible. A simple way out of this misery is a slight change to the template argument list of these facades:
template<class GridImp, class IntersectionImp> class Intersection;
template<class GridImp, class IntersectionIteratorImp, class IntersectionImp> class IntersectionIterator;
This change would be in line with the template argument list of the EntityIterator. Moreover, it simplifies grid code and has (nearly) no impact on user code (unless they write their own grid or directly use the facade, e.g, to distinguish between an entity and an intersection). Notice that proper deprecation is not possible in this case.
Before coding anything in this direction, I would like the opionion of my fellow-developers on such a change.