diff --git a/src/common/span.h b/src/common/span.h index 173cb095c..75cfd7059 100644 --- a/src/common/span.h +++ b/src/common/span.h @@ -31,8 +31,8 @@ #include // CHECK -#include // int64_t -#include // remove_cv_t +#include // int64_t +#include /*! * The version number 1910 is picked up from GSL. @@ -237,9 +237,9 @@ class SpanIterator { /*! * The extent E of the span returned by subspan is determined as follows: * - * - If Count is not std::dynamic_extent, Count; - * - Otherwise, if Extent is not std::dynamic_extent, Extent - Offset; - * - Otherwise, std::dynamic_extent. + * - If Count is not dynamic_extent, Count; + * - Otherwise, if Extent is not dynamic_extent, Extent - Offset; + * - Otherwise, dynamic_extent. */ template struct IsSpanOracle : std::false_type {}; -template +template struct IsSpanOracle> : std::true_type {}; template @@ -434,7 +434,7 @@ class Span { XGBOOST_DEVICE Span(const Container& _cont) : size_(_cont.size()), // NOLINT data_(_cont.data()) {} - template ::value && detail::IsAllowedExtentConversion::value>> @@ -456,7 +456,7 @@ class Span { return {this, 0}; } - XGBOOST_DEVICE constexpr iterator end() const __span_noexcept { // NOLINT + XGBOOST_DEVICE constexpr iterator end() const __span_noexcept { // NOLINT return {this, size()}; } @@ -464,7 +464,7 @@ class Span { return {this, 0}; } - XGBOOST_DEVICE constexpr const_iterator cend() const __span_noexcept { // NOLINT + XGBOOST_DEVICE constexpr const_iterator cend() const __span_noexcept { // NOLINT return {this, size()}; } @@ -538,8 +538,8 @@ class Span { * If Count is std::dynamic_extent, r.size() == this->size() - Offset; * Otherwise r.size() == Count. */ - template < detail::ptrdiff_t Offset, - detail::ptrdiff_t Count = dynamic_extent > + template XGBOOST_DEVICE auto subspan() const -> // NOLINT Span::value> {