14#ifndef ROOT_RHYSD_SPAN_H 
   15#define ROOT_RHYSD_SPAN_H 
   17#if __cplusplus >= 202002 
   18# if __has_include(<span>) 
   23#if !defined(__cpp_lib_span) 
   26#if __cplusplus >= 201402L 
   27#define R__CONSTEXPR_IF_CXX14 constexpr 
   29#define R__CONSTEXPR_IF_CXX14 
   41#include <initializer_list> 
   50  static bool const value = 
false;
 
 
   52template<
class T, 
size_t N>
 
   54  static bool const value = 
true;
 
   58  static bool const value = 
true;
 
   62  static bool const value = 
true;
 
   72template<
class IndicesType, 
size_t Next>
 
   75template<
size_t... 
Indices, 
size_t Next>
 
   80template<
class IndicesType, 
size_t Next, 
size_t Tail>
 
   83template<
size_t... 
Indices, 
size_t Next, 
size_t Tail>
 
   88template<
size_t First, 
size_t Step, 
size_t N, 
class = 
void>
 
   91template<
size_t First, 
size_t Step, 
size_t N>
 
  101template<
size_t First, 
size_t Step, 
size_t N>
 
  111template<
size_t First, 
size_t Step, 
size_t N>
 
  119      typename ROOT::Detail::make_indices_impl<First, Step, N / 2>::type,
 
  124template<
size_t First, 
size_t Step, 
size_t N>
 
  125struct make_indices_impl<
 
  132      typename ROOT::Detail::make_indices_impl<First, Step, N / 2>::type,
 
  133      First + N / 2 * Step,
 
  134      First + (N - 1) * Step
 
  138template<
size_t First, 
size_t Last, 
size_t Step = 1>
 
  143      ((Last - First) + (Step - 1)) / Step
 
 
  147template < 
size_t Start, 
size_t Last, 
size_t Step = 1 >
 
  155inline namespace __ROOT {
 
  159struct check_bound_t {};
 
  160static constexpr check_bound_t check_bound{};
 
  168  typedef T element_type;
 
  169  typedef std::remove_cv<T>     value_type;
 
  170  typedef element_type *        pointer;
 
  171  typedef element_type 
const*   const_pointer;
 
  172  typedef element_type &        reference;
 
  173  typedef element_type 
const&   const_reference;
 
  174  typedef element_type *        iterator;
 
  175  typedef element_type 
const*   const_iterator;
 
  176  typedef ptrdiff_t             difference_type;
 
  177  typedef std::size_t           size_type;
 
  178  typedef std::reverse_iterator<iterator> reverse_iterator;
 
  179  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
 
  185     : length_(0), data_(
nullptr)
 
  188  constexpr span(span 
const&) 
noexcept = 
default;
 
  195     : length_(
N), data_(
N > 0 ? 
a.data() : 
nullptr)
 
  200  template<
size_type N>
 
  202     : length_(
N), data_(
N > 0 ? std::addressof(
a[0]) : nullptr)
 
  204    static_assert(
N > 0, 
"Zero-length array is not permitted in ISO C++.");
 
  207   span(std::vector<
typename std::remove_cv<T>::type> 
const& 
v) 
noexcept 
  208     : length_(
v.size()), data_(
v.empty() ? 
nullptr : 
v.
data())
 
  211   span(std::vector<
typename std::remove_cv<T>::type> & 
v) 
noexcept 
  212     : length_(
v.size()), data_(
v.empty() ? 
nullptr : 
v.
data())
 
  215   constexpr span(pointer 
a, size_type 
const n) 
noexcept 
  216     : length_(
n), data_(
a)
 
  221     class = 
typename std::enable_if<
 
  223           typename std::remove_cv<T>::type,
 
  224           typename std::iterator_traits<InputIterator>::value_type
 
  232  span(std::initializer_list<T> 
const& 
l)
 
  233     : length_(
l.
size()), data_(std::begin(
l))
 
  236  span& 
operator=(span 
const&) 
noexcept = 
default;
 
  248    return data_ + length_;
 
  258  reverse_iterator rbegin()
 const 
  262  reverse_iterator rend()
 const 
  266  const_reverse_iterator crbegin()
 const 
  270  const_reverse_iterator crend()
 const 
  294  constexpr reference operator[](size_type 
const n) 
const noexcept 
  298  constexpr reference at(size_type 
const n)
 const 
  303    return n >= length_ ? 
throw std::out_of_range(
"span::at()") : *(data_ + 
n);
 
  315    return *(data_ + length_ - 1);
 
  323  constexpr span<T> slice(check_bound_t, size_type 
const pos, size_type 
const slicelen)
 const 
  330    return pos >= length_ || pos + 
slicelen >= length_ ? 
throw std::out_of_range(
"span::slice()") : span<T>{begin() + pos, begin() + pos + 
slicelen};
 
  332  constexpr span<T> slice_before(check_bound_t, size_type 
const pos)
 const 
  339    return pos >= length_ ? std::out_of_range(
"span::slice()") : span<T>{begin(), begin() + pos};
 
  341  constexpr span<T> slice_after(check_bound_t, size_type 
const pos)
 const 
  348    return pos >= length_ ? std::out_of_range(
"span::slice()") : span<T>{begin() + pos, 
end()};
 
  352  constexpr span<T> slice(size_type 
const pos, size_type 
const slicelen)
 const 
  356  constexpr span<T> slice_before(size_type 
const pos)
 const 
  358    return span<T>{begin(), begin() + pos};
 
  360  constexpr span<T> slice_after(size_type 
const pos)
 const 
  368  constexpr span<T> slice(check_bound_t, iterator start, iterator last)
 const 
  378    return ( start >= 
end() ||
 
  381             static_cast<size_t>(std::distance(start, last > 
end() ? 
end() : last)) > length_ - std::
distance(begin(), 
start) ) ? 
throw std::out_of_range(
"span::slice()") : span<T>{
start, last > 
end() ? 
end() : last};
 
  383  constexpr span<T> slice_before(check_bound_t, iterator 
const pos)
 const 
  390    return pos < begin() || pos > 
end() ? 
throw std::out_of_range(
"span::slice()") : span<T>{begin(), pos > 
end() ? 
end() : pos};
 
  392  constexpr span<T> slice_after(check_bound_t, iterator 
const pos)
 const 
  399    return pos < begin() || pos > 
end() ? 
throw std::out_of_range(
"span::slice()") : span<T>{pos < begin() ? begin() : pos, 
end()};
 
  403  constexpr span<T> slice(iterator start, iterator last)
 const 
  407  constexpr span<T> slice_before(iterator 
const pos)
 const 
  411  constexpr span<T> slice_after(iterator 
const pos)
 const 
  423  -> std::vector<
typename std::remove_cv<T>::type, 
Allocator>
 
  429  auto to_array() 
const 
  435  template<
size_t... 
I>
 
  437  -> std::array<T, 
sizeof...(I)>
 
  439    return {{(
I < length_ ? *(data_ + 
I) : T{} )...}};
 
  454template< 
class ArrayL, 
class ArrayR >
 
  476inline namespace __ROOT {
 
  478template<
class T1, 
class T2>
 
  488   class = 
typename std::enable_if<
 
  498template<
class T1, 
class T2, 
size_t N>
 
  508   class = 
typename std::enable_if<
 
  521   class = 
typename std::enable_if<
 
  534   class = 
typename std::enable_if<
 
  549   class = 
typename std::enable_if<
 
  554auto make_view(Array 
const& 
a)
 
  560template< 
class T, 
size_t N>
 
  569span<T> make_view(T 
const* 
p, 
typename span<T>::size_type 
const n)
 
  578  return Result{begin, 
end};
 
  583span<T> make_view(std::initializer_list<T> 
const& 
l)
 
  601#include <type_traits> 
  613  static constexpr int rank = Rank;
 
  614  using reference = ptrdiff_t &;
 
  615  using const_reference = 
const ptrdiff_t &;
 
  616  using size_type = size_t;
 
  617  using value_type = ptrdiff_t;
 
  620  std::array<value_type, Rank> 
m_B;
 
  630  reference operator[](size_type i) 
noexcept { 
return m_B[i]; }
 
  632  constexpr const_reference operator[](
 
  633     size_type i) 
const noexcept { 
return m_B[i]; };
 
  661  static constexpr int rank = Rank;
 
  662  using reference = ptrdiff_t &;
 
  663  using const_reference = 
const ptrdiff_t &;
 
  664  using size_type = size_t;
 
  665  using value_type = ptrdiff_t;
 
  712  static constexpr int rank = Rank;
 
  715  using size_type = 
typename bounds_type::size_type;
 
  716  using value_type = ValueType;
 
  717  using pointer = 
typename std::add_pointer_t<value_type>;
 
  718  using reference = 
typename std::add_lvalue_reference_t<value_type>;
 
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
Bool_t operator!=(const TDatime &d1, const TDatime &d2)
 
Bool_t operator==(const TDatime &d1, const TDatime &d2)
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
 
Binding & operator=(OUT(*fun)(void))
 
TString operator+(const TString &s1, const TString &s2)
Use the special concatenation constructor.
 
std::string & operator+=(std::string &left, const TString &right)
 
TTime operator-(const TTime &t1, const TTime &t2)
 
RVec< T0 > & operator-=(RVec< T0 > &v, const T1 &y)
 
typename make_indices_< Start, Last, Step >::type make_indices
 
bool operator_equal_impl(ArrayL const &lhs, size_t const lhs_size, ArrayR const &rhs, size_t const rhs_size)
 
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
 
#define R__CONSTEXPR_IF_CXX14
 
static constexpr size_t value[sizeof...(Indices)]