Skip to content

Some template-related cleanup for Span

Podhorszki, Norbert requested to merge github/fork/germasch/pr/cleanup-span into master

Created by: germasch

This is basically all cleanup only. The one API change is that cxx11::Span and core::Span become top-level classes (ie, not nested within Variable). That is for two reasons:

  • So that core::Span can be forward declared and hence directly used in the pimpl-type cxx11::Span without resorting to reinterpret_cast.
  • So that the Spans can be defined / instantiated as a whole class, rather than being all specialized by a macro loop for each type.

There is no user-visible change, except that Span is now also available as adios2::Span<T> in addition to adios2::Variable<T>::Span, which I'd argue makes life a bit easier. But if you want avoid polluting of the adios2 namespace, it could be moved to adios2::detail.

The patch does remove Span::rbegin and Span::rend because they were broken (wouldn't compile, but that didn't show because they were never instantiated). They obviously could be added back if one were to properly implement bidirectional or random access operators.

This PR reduces code size (lines of code):

 7 files changed, 146 insertions(+), 186 deletions(-)

Merge request reports

Loading