Skip to content
Snippets Groups Projects

Adapted code to newest gsl::span

Merged Sebastien Ponce requested to merge sponce_fixedSimilaritydev4 into master

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 ?

Edited by Rosen Matev

Merge request reports

Pipeline #1872069 passed

Pipeline passed for 1c9d6ed1 on sponce_fixedSimilaritydev4

Merged by Daniel Hugo Campora PerezDaniel Hugo Campora Perez 4 years ago (Aug 19, 2020 8:50am UTC)

Loading

Pipeline #1877254 passed

Pipeline passed for a30b3cb2 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading