Adapted code to newest gsl::span
Quite trivial fix but I do not understand why we need it. Maybe @graven can comment ?
As an hint, here is the relevant change in the gsl::span code :
- constexpr span(pointer ptr, size_type count) noexcept : storage_(ptr, count)
+ template <std::size_t MyExtent = Extent, std::enable_if_t<MyExtent != gsl::dynamic_extent, int> = 0>
+ constexpr explicit span(pointer ptr, size_type count) noexcept : storage_(ptr, count)
{
- if (Extent != dynamic_extent) Expects(count == Extent);
+ Expects(count == Extent);
}
I suppose the templating breaks the usage of initializer list ?
Merge request reports
Activity
added lhcb-lcg-dev4 label
added backport run2 label
added lhcb-lcg-dev3 label
It is the addition of
explicit
to the constructor that forces the change -- see here. There has been a proposal to makereturn { ... }
implicitly be considered as being explicit (i.e. allow it invoke constructors labelled asexplicit
), but that didn't make it....Edited by Gerhard RavenThis reminds me of something else -- for the new GSL, they made it 'tricky' to remove the bounds checking, which actually uses non-zero resources. So in
STLExtensions.h
I worked around it so that in non-debug mode the bounds checking is still removed. But due to the dependencies, the code in LHCbMath directly uses GSL::span instead of throughSTLExtensions.h
. So the little pre-amble that does some preprocessor magic to remove the bounds checking has to be copied intoSimilarity.h
. I'll make a separate MR for that....see !2696 (merged)
- [2020-08-14 00:06] Validation started with lhcb-lcg-dev4#1373
- [2020-08-14 00:16] Validation started with lhcb-lcg-dev3#1358
Edited by Software for LHCb- Resolved by Sebastien Ponce
This fixed the errors in Similarity, but there are a couple of similar ones elsewhere. See https://lhcb-nightlies.web.cern.ch/logs/build/nightly/lhcb-lcg-dev3/1358/x86_64-centos7-gcc9-opt/LHCb/
- Resolved by Sebastien Ponce
- Resolved by Sebastien Ponce
- Resolved by Sebastien Ponce
- Resolved by Sebastien Ponce