\hypertarget{multi__span_8h_source}{}\doxysection{multi\+\_\+span.\+h}
\label{multi__span_8h_source}\index{kblib/multi\_span.h@{kblib/multi\_span.h}}
\mbox{\hyperlink{multi__span_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00001}00001 \textcolor{comment}{/* *****************************************************************************}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00002}00002 \textcolor{comment}{ * kblib is a general utility library for C++14 and C++17, intended to provide}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00003}00003 \textcolor{comment}{ * performant high-\/level abstractions and more expressive ways to do simple}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00004}00004 \textcolor{comment}{ * things.}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00005}00005 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00006}00006 \textcolor{comment}{ * Copyright (c) 2021 killerbee}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00007}00007 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00008}00008 \textcolor{comment}{ * This program is free software: you can redistribute it and/or modify}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00009}00009 \textcolor{comment}{ * it under the terms of the GNU General Public License as published by}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00010}00010 \textcolor{comment}{ * the Free Software Foundation, either version 3 of the License, or}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00011}00011 \textcolor{comment}{ * (at your option) any later version.}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00012}00012 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00013}00013 \textcolor{comment}{ * This program is distributed in the hope that it will be useful,}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00014}00014 \textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00015}00015 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00016}00016 \textcolor{comment}{ * GNU General Public License for more details.}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00017}00017 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00018}00018 \textcolor{comment}{ * You should have received a copy of the GNU General Public License}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00019}00019 \textcolor{comment}{ * along with this program.  If not, see <https://www.gnu.org/licenses/>.}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00020}00020 \textcolor{comment}{ * ****************************************************************************/}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00021}00021 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00031}00031 \textcolor{preprocessor}{\#ifndef MULTI\_SPAN\_H}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00032}00032 \textcolor{preprocessor}{\#define MULTI\_SPAN\_H}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00034}00034 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{tdecl_8h}{tdecl.h}}"{}}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00036}00036 \textcolor{preprocessor}{\#if KBLIB\_USE\_CXX17}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00038}00038 \textcolor{preprocessor}{\#  include <initializer\_list>}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00039}00039 \textcolor{preprocessor}{\#  include <optional>}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00040}00040 \textcolor{preprocessor}{\#  include <ostream>}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00041}00041 \textcolor{preprocessor}{\#  include <type\_traits>}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00042}00042 \textcolor{preprocessor}{\#  include <utility>}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00043}00043 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00044}00044 \textcolor{preprocessor}{\#  include <boost/iterator.hpp>}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00045}00045 \textcolor{preprocessor}{\#  include <boost/iterator/iterator\_facade.hpp>}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00046}00046 \textcolor{preprocessor}{\#  include <gsl/gsl>}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00048}00048 \textcolor{keyword}{namespace }\mbox{\hyperlink{tdecl_8h_a4b5c574c663a392148218cd4410fd7a1}{KBLIB\_NS}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00050}00050 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00051}00051 \textcolor{keyword}{class }multi\_span;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00053}\mbox{\hyperlink{namespacekblib_1_1multi__impl}{00053}} \textcolor{keyword}{namespace }multi\_impl \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00054}00054 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00055}00055    \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00056}\mbox{\hyperlink{namespacekblib_1_1multi__impl_a13bb9fcc3b19c9b5227433a4fb581881}{00056}}    \textcolor{keyword}{using }\mbox{\hyperlink{namespacekblib_1_1multi__impl_a13bb9fcc3b19c9b5227433a4fb581881}{subspan\_t}} = std::pair<std::ptrdiff\_t, gsl::span<T>>;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00058}00058    \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00059}\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{00059}}    \textcolor{keyword}{class }\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{mulspan\_iterator}}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00060}00060        : \textcolor{keyword}{public} boost::iterator\_facade<mulspan\_iterator<T>, T,}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00061}00061                                        std::bidirectional\_iterator\_tag> \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00062}00062     \textcolor{keyword}{public}:}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00063}\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator_ae34517965a2cce4462e9dc66a104879d}{00063}}       \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator_ae34517965a2cce4462e9dc66a104879d}{mulspan\_iterator}}() = \textcolor{keywordflow}{default};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00064}\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator_aac224b77cf130d1f782e8947424e9477}{00064}}       \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator_aac224b77cf130d1f782e8947424e9477}{mulspan\_iterator}}(\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span<T>}}\& s)}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00065}00065           : parent(\&s) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00066}00066          recalculate\_cache();}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00067}00067       \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00068}\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator_aab3fadf53bdfd1c068c16d0001700d23}{00068}}       \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator_aab3fadf53bdfd1c068c16d0001700d23}{mulspan\_iterator}}(\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span<T>}}\& s, std::ptrdiff\_t i)}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00069}00069           : parent(\&s)}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00070}00070           , index(i) \{\}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00072}00072     \textcolor{keyword}{private}:}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00073}00073       \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{mulspan\_iterator}}(\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span<T>}}\& s, std::ptrdiff\_t i,}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00074}00074                        \textcolor{keyword}{typename} std::vector<\mbox{\hyperlink{namespacekblib_1_1multi__impl_a13bb9fcc3b19c9b5227433a4fb581881}{subspan\_t<T>}}>::const\_iterator r,}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00075}00075                        \textcolor{keyword}{typename} gsl::span<T>::iterator p)}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00076}00076           : parent(\&s)}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00077}00077           , index(i)}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00078}00078           , pos\_cache(cached\_iterator\{r, p\}) \{\}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00080}00080     \textcolor{keyword}{public}:}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00081}00081       \textcolor{keyword}{template} <\textcolor{keyword}{typename} U,}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00082}00082                 \textcolor{keyword}{typename}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00083}00083                 = \mbox{\hyperlink{namespacekblib_a366272ad8baad19be4ccf8128afb04a3}{std::enable\_if\_t}}<std::is\_convertible\_v<U (*)[], T (*)[]>>>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00084}\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator_a8f9625d43fa0458fd4456e91b605b454}{00084}}       \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator_a8f9625d43fa0458fd4456e91b605b454}{mulspan\_iterator}}(\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{mulspan\_iterator<U>}}\&);}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00085}00085       \textcolor{keyword}{template} <\textcolor{keyword}{typename} U,}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00086}00086                 \textcolor{keyword}{typename}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00087}00087                 = \mbox{\hyperlink{namespacekblib_a366272ad8baad19be4ccf8128afb04a3}{std::enable\_if\_t}}<std::is\_convertible\_v<U (*)[], T (*)[]>>>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00088}\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator_a857e2d3ca3bb50fc027722a71760cbd4}{00088}}       \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator_a857e2d3ca3bb50fc027722a71760cbd4}{mulspan\_iterator}}(\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{mulspan\_iterator<U>}}\&\&);}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00089}00089 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00090}00090     \textcolor{keyword}{private}:}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00091}\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator_ac09f73e325921cc50ebcd96bed0f8096}{00091}}       \textcolor{keyword}{friend} \textcolor{keyword}{class }boost::iterator\_core\_access;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00093}00093       \textcolor{keyword}{auto} recalculate\_cache() const -\/> \textcolor{keywordtype}{void} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00094}00094          \textcolor{keywordflow}{if} (! pos\_cache) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00095}00095             \textcolor{keywordflow}{if} (index == 0) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00096}00096                pos\_cache = \{parent-\/>spans.begin(),}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00097}00097                             parent-\/>spans.front().second.begin()\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00098}00098             \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (index == parent-\/>size()) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00099}00099                pos\_cache}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00100}00100                    = \{parent-\/>spans.end(), parent-\/>spans.back().second.begin()\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00101}00101             \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\textcolor{keyword}{auto} it = std::prev(parent-\/>spans.end());}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00102}00102                        index >= it-\/>first) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00103}00103                pos\_cache = \{it, it-\/>second.begin() + (index -\/ it-\/>first)\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00104}00104             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00105}00105                \textcolor{comment}{// get the subspan before the first subspan starting after index}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00106}00106                it = std::prev(std::upper\_bound(}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00107}00107                    parent-\/>spans.begin(), parent-\/>spans.end(), index,}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00108}00108                    [](std::ptrdiff\_t l, \textcolor{keyword}{const} subspan\_t<T>\& r) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00109}00109                       return l < r.first;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00110}00110                    \}));}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00111}00111                \textcolor{comment}{// calculate delta into that subspan}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00112}00112                pos\_cache = \{it, it-\/>second.begin() + (index -\/ it-\/>first)\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00113}00113             \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00114}00114          \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00115}00115       \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00116}00116       \textcolor{keyword}{auto} dereference() const noexcept -\/> T\& \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00117}00117          recalculate\_cache();}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00118}00118          assert(index != parent-\/>size());}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00119}00119          \textcolor{keywordflow}{return} *pos\_cache.value().pos;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00120}00120       \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00121}00121       \textcolor{keyword}{template} <\textcolor{keyword}{typename} U,}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00122}00122                 \textcolor{keyword}{typename} = \textcolor{keyword}{decltype}(std::declval<T*>() == std::declval<U*>())>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00123}00123       \textcolor{keyword}{auto} \mbox{\hyperlink{namespacekblib_afbec3807c1be9d0aea88c620d673823c}{equal}}(\textcolor{keyword}{const} mulspan\_iterator<U>\& o) \textcolor{keyword}{const} \textcolor{keyword}{noexcept} -\/> \textcolor{keywordtype}{bool} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00124}00124          \textcolor{keywordflow}{return}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00125}00125              \textcolor{comment}{// if both *this and o have caches,}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00126}00126              \textcolor{comment}{/*(pos\_cache and o.pos\_cache)}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00127}00127 \textcolor{comment}{             //compare them}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00128}00128 \textcolor{comment}{             ? pos\_cache.value() == o.pos\_cache.value()}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00129}00129 \textcolor{comment}{             //else, compare parent and index}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00130}00130 \textcolor{comment}{             :*/}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00131}00131              std::tie(parent, index) == std::tie(o.parent, o.index);}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00132}00132       \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00133}00133       \textcolor{keyword}{auto} increment() noexcept -\/> \textcolor{keywordtype}{void} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00134}00134          ++index;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00135}00135          \textcolor{keywordflow}{if} (pos\_cache) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00136}00136             ++pos\_cache.value().pos;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00137}00137             \textcolor{keywordflow}{if} (pos\_cache.value().pos == pos\_cache.value().subs-\/>second.end()) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00138}00138                ++pos\_cache.value().subs;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00139}00139                pos\_cache.value().pos = pos\_cache.value().subs-\/>second.begin();}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00140}00140             \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00141}00141          \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00142}00142       \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00143}00143       \textcolor{keyword}{auto} decrement() noexcept -\/> \textcolor{keywordtype}{void} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00144}00144          -\/-\/index;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00145}00145          \textcolor{keywordflow}{if} (pos\_cache) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00146}00146             \textcolor{keywordflow}{if} (pos\_cache.value().pos}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00147}00147                 == pos\_cache.value().subs-\/>second.begin()) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00148}00148                -\/-\/pos\_cache.value().subs;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00149}00149                pos\_cache.value().pos = pos\_cache.value().subs-\/>second.end();}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00150}00150             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00151}00151                -\/-\/pos\_cache.value().pos;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00152}00152             \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00153}00153          \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00154}00154       \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00155}00155       \textcolor{keyword}{auto} advance(std::ptrdiff\_t delta) \textcolor{keyword}{noexcept} -\/> \textcolor{keywordtype}{void} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00156}00156          index += delta;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00157}00157          pos\_cache = std::nullopt;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00158}00158       \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00159}00159       \textcolor{comment}{// enabled if T* is comparable with U*}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00160}00160       \textcolor{keyword}{template} <\textcolor{keyword}{typename} U,}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00161}00161                 \textcolor{keyword}{typename} = \textcolor{keyword}{decltype}(std::declval<T*>() == std::declval<U*>())>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00162}00162       \textcolor{keyword}{auto} distance\_to(mulspan\_iterator<U> o) \textcolor{keyword}{const} \textcolor{keyword}{noexcept} -\/> std::ptrdiff\_t \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00163}00163          \textcolor{keywordflow}{return} index -\/ o.index;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00164}00164       \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00166}00166       \textcolor{keyword}{const} multi\_span<T>* parent\{\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00167}00167       std::ptrdiff\_t index\{\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00168}00168       \textcolor{keyword}{struct }cached\_iterator \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00169}00169          \textcolor{keyword}{typename} std::vector<multi\_impl::subspan\_t<T>>::const\_iterator subs;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00170}00170          \textcolor{keyword}{typename} gsl::span<T>::iterator pos;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00171}00171          \textcolor{keyword}{auto} operator==(\textcolor{keyword}{const} cached\_iterator\& o) \textcolor{keyword}{const} \textcolor{keyword}{noexcept} -\/> \textcolor{keywordtype}{bool} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00172}00172             \textcolor{keywordflow}{return} std::tie(subs, pos) == std::tie(o.subs, o.pos);}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00173}00173          \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00174}00174       \};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00175}\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator_aa634b8c3e39b0cd029faaba404416c78}{00175}}       \textcolor{keyword}{mutable} std::optional<cached\_iterator> pos\_cache = std::nullopt;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00177}00177       \textcolor{keyword}{friend} \textcolor{keyword}{class }\mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span}}<T>;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00178}00178    \};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00180}00180 \} \textcolor{comment}{// namespace multi\_impl}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00182}00182 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00183}\mbox{\hyperlink{classkblib_1_1multi__span}{00183}} \textcolor{keyword}{class }\mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00184}00184  \textcolor{keyword}{public}:}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00185}\mbox{\hyperlink{classkblib_1_1multi__span_a60f616f9ac42dca0546600d378756729}{00185}}    \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1multi__span_a60f616f9ac42dca0546600d378756729}{element\_type}} = T;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00186}\mbox{\hyperlink{classkblib_1_1multi__span_aad91603a4803cfb9ec27f836b411638e}{00186}}    \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1multi__span_aad91603a4803cfb9ec27f836b411638e}{value\_type}} = std::remove\_cv<T>;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00187}\mbox{\hyperlink{classkblib_1_1multi__span_ae023d7a28c73c4d5da3d0517369e8b41}{00187}}    \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1multi__span_ae023d7a28c73c4d5da3d0517369e8b41}{index\_type}} = std::ptrdiff\_t;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00188}\mbox{\hyperlink{classkblib_1_1multi__span_aa4ba455c803bd2eabdc13c62ca2ba5af}{00188}}    \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1multi__span_aa4ba455c803bd2eabdc13c62ca2ba5af}{difference\_type}} = std::ptrdiff\_t;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00189}\mbox{\hyperlink{classkblib_1_1multi__span_a46a73a3adc7b48adfd7e1147eb8bacf8}{00189}}    \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1multi__span_a46a73a3adc7b48adfd7e1147eb8bacf8}{pointer}} = T*;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00190}\mbox{\hyperlink{classkblib_1_1multi__span_ad948abab4de050b9f95feb1873e2b1b0}{00190}}    \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1multi__span_ad948abab4de050b9f95feb1873e2b1b0}{reference}} = T\&;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00191}\mbox{\hyperlink{classkblib_1_1multi__span_a3c18cddb2e4dbb0d67c9faf4ec059020}{00191}}    \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{iterator}} = \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{multi\_impl::mulspan\_iterator<T>}};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00192}\mbox{\hyperlink{classkblib_1_1multi__span_a5f354f8f26a3b3defc9475e2e3060c1a}{00192}}    \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{const\_iterator}} = \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{multi\_impl::mulspan\_iterator<const T>}};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00193}\mbox{\hyperlink{classkblib_1_1multi__span_a61e7db60d6ba6195f9b40926ad783f6d}{00193}}    \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1multi__span_a61e7db60d6ba6195f9b40926ad783f6d}{reverse\_iterator}} = std::reverse\_iterator<iterator>;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00194}\mbox{\hyperlink{classkblib_1_1multi__span_a9f20f78330e27c8d0e3cabd9fcf313c1}{00194}}    \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1multi__span_a9f20f78330e27c8d0e3cabd9fcf313c1}{const\_reverse\_iterator}} = std::reverse\_iterator<const\_iterator>;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00195}00195 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00196}\mbox{\hyperlink{classkblib_1_1multi__span_acc5c1a345ca49984d81642f7bac43d4b}{00196}}    \mbox{\hyperlink{classkblib_1_1multi__span_acc5c1a345ca49984d81642f7bac43d4b}{multi\_span}}() noexcept}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00197}00197        : spans\{\{0, \{\}\}\} \{\}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00198}00198    \textcolor{keyword}{template} <\textcolor{keyword}{typename} U,}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00199}00199              \textcolor{keyword}{typename}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00200}00200              = \mbox{\hyperlink{namespacekblib_a366272ad8baad19be4ccf8128afb04a3}{std::enable\_if\_t}}<std::is\_convertible\_v<U (*)[], T (*)[]>>>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00201}\mbox{\hyperlink{classkblib_1_1multi__span_a2ff01d2ba5c3eafebafdded9bcbdab8e}{00201}}    \mbox{\hyperlink{classkblib_1_1multi__span_a2ff01d2ba5c3eafebafdded9bcbdab8e}{multi\_span}}(gsl::span<U> o) noexcept}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00202}00202        : spans\{\{0, o\}, \{o.size(), \{\}\}\} \{\}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00203}00203    \textcolor{keyword}{template} <\textcolor{keyword}{typename} U,}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00204}00204              \textcolor{keyword}{typename}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00205}00205              = \mbox{\hyperlink{namespacekblib_a366272ad8baad19be4ccf8128afb04a3}{std::enable\_if\_t}}<std::is\_convertible\_v<U (*)[], T (*)[]>>>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00206}\mbox{\hyperlink{classkblib_1_1multi__span_a3bc207ad4314bc68185870e92af7b9bb}{00206}}    \mbox{\hyperlink{classkblib_1_1multi__span_a3bc207ad4314bc68185870e92af7b9bb}{multi\_span}}(std::initializer\_list<gsl::span<U>> i\_spans) \textcolor{keyword}{noexcept} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00207}00207       \mbox{\hyperlink{classkblib_1_1multi__span_ae023d7a28c73c4d5da3d0517369e8b41}{index\_type}} c}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00208}00208           = \mbox{\hyperlink{namespacekblib_abedf2e5c556e6ab3ebb779227172a2ac}{std::accumulate}}(i\_spans.begin(), i\_spans.end(), \mbox{\hyperlink{classkblib_1_1multi__span_ae023d7a28c73c4d5da3d0517369e8b41}{index\_type}}\{0\},}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00209}00209                             [\textcolor{keyword}{this}](\textcolor{keywordtype}{int} c, gsl::span<U> s) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00210}00210                                spans.push\_back(\{c, s\});}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00211}00211                                \textcolor{keywordflow}{return} c + s.size();}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00212}00212                             \});}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00213}00213       spans.push\_back(\{c, \{\}\});}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00214}00214    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00215}00215    \textcolor{keyword}{template} <\textcolor{keyword}{typename} Iterator,}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00216}00216              \textcolor{keyword}{typename} = \mbox{\hyperlink{namespacekblib_a366272ad8baad19be4ccf8128afb04a3}{std::enable\_if\_t}}<std::is\_convertible\_v<}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00217}00217                  \textcolor{keyword}{decltype}(*std::declval<Iterator>()), gsl::span<T>>>>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00218}\mbox{\hyperlink{classkblib_1_1multi__span_a22b9952e422248740d79f5e954f9b33b}{00218}}    \mbox{\hyperlink{classkblib_1_1multi__span_a22b9952e422248740d79f5e954f9b33b}{multi\_span}}(Iterator begin, Iterator end) \textcolor{keyword}{noexcept} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00219}00219       \mbox{\hyperlink{classkblib_1_1multi__span_ae023d7a28c73c4d5da3d0517369e8b41}{index\_type}} c = \mbox{\hyperlink{namespacekblib_abedf2e5c556e6ab3ebb779227172a2ac}{std::accumulate}}(begin, end, \mbox{\hyperlink{classkblib_1_1multi__span_ae023d7a28c73c4d5da3d0517369e8b41}{index\_type}}\{0\},}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00220}00220                                      [\textcolor{keyword}{this}](\textcolor{keywordtype}{int} c, gsl::span<T> s) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00221}00221                                         spans.push\_back(\{c, s\});}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00222}00222                                         \textcolor{keywordflow}{return} c + s.size();}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00223}00223                                      \});}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00224}00224       spans.push\_back(\{c, \{\}\});}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00225}00225    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00227}00227    \textcolor{keyword}{template} <\textcolor{keyword}{typename} U,}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00228}00228              \textcolor{keyword}{typename}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00229}00229              = \mbox{\hyperlink{namespacekblib_a366272ad8baad19be4ccf8128afb04a3}{std::enable\_if\_t}}<std::is\_convertible\_v<U (*)[], T (*)[]>>>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00230}\mbox{\hyperlink{classkblib_1_1multi__span_a865254f353f96a1470b4330a680e9aa2}{00230}}    \mbox{\hyperlink{classkblib_1_1multi__span_a865254f353f96a1470b4330a680e9aa2}{multi\_span}}(\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span<U>}}\&);}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00232}\mbox{\hyperlink{classkblib_1_1multi__span_a247d59bb644fceac83a27d470ba54620}{00232}}    \mbox{\hyperlink{classkblib_1_1multi__span_a247d59bb644fceac83a27d470ba54620}{multi\_span}}(\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span}}\&) = \textcolor{keywordflow}{default};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00233}\mbox{\hyperlink{classkblib_1_1multi__span_a6642ef9b8b70e13f56be6210a3792799}{00233}}    \mbox{\hyperlink{classkblib_1_1multi__span_a6642ef9b8b70e13f56be6210a3792799}{multi\_span}}(\mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span}}\&\&) noexcept = default;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00234}00234 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00235}\mbox{\hyperlink{classkblib_1_1multi__span_a7a17da3c036ea3e668b0045a89788d9b}{00235}}    auto operator=(const \mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span}}\&) -\/> \mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span}}\& = default;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00236}\mbox{\hyperlink{classkblib_1_1multi__span_af0ac4f61e50eca819c4c04cd3001e3eb}{00236}}    auto operator=(\mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span}}\&\&) noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span}}\& = default;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00237}00237 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00238}\mbox{\hyperlink{classkblib_1_1multi__span_af4fb07f991c6556efff4dcef1193fd5f}{00238}}    \string~\mbox{\hyperlink{classkblib_1_1multi__span}{multi\_span}}() = default;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00239}00239 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00240}\mbox{\hyperlink{classkblib_1_1multi__span_ad9c9b02c5e3242a23ff6dd7f2feeff18}{00240}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} auto begin() noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{iterator}} \{ \textcolor{keywordflow}{return} \{*\textcolor{keyword}{this}\}; \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00241}\mbox{\hyperlink{classkblib_1_1multi__span_a2054f6ee21d6e1673c5b2648010b19a6}{00241}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_a2054f6ee21d6e1673c5b2648010b19a6}{begin}}() const noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{const\_iterator}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00242}00242       \textcolor{keywordflow}{return} \{*\textcolor{keyword}{this}\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00243}00243    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00244}\mbox{\hyperlink{classkblib_1_1multi__span_a880a3454fa6f4519c4538a289a264612}{00244}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_a880a3454fa6f4519c4538a289a264612}{cbegin}}() const noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{const\_iterator}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00245}00245       \textcolor{keywordflow}{return} \{*\textcolor{keyword}{this}\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00246}00246    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00247}00247 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00248}\mbox{\hyperlink{classkblib_1_1multi__span_a160fc835b8bb53c1d0c4237a35b6daac}{00248}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_a160fc835b8bb53c1d0c4237a35b6daac}{end}}() noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{iterator}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00249}00249       \textcolor{keywordflow}{return} \{*\textcolor{keyword}{this}, \mbox{\hyperlink{namespacekblib_1_1fakestd_adb8781bc0e5d1ba4ca4624293c0c98ae}{size}}(), spans.end(), spans.back().second.begin()\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00250}00250    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00251}\mbox{\hyperlink{classkblib_1_1multi__span_aacbbac39078f1fd6b6809105fa74df95}{00251}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_aacbbac39078f1fd6b6809105fa74df95}{end}}() const noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{const\_iterator}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00252}00252       \textcolor{keywordflow}{return} \{*\textcolor{keyword}{this}, \mbox{\hyperlink{namespacekblib_1_1fakestd_adb8781bc0e5d1ba4ca4624293c0c98ae}{size}}(), spans.end(), spans.back().second.begin()\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00253}00253    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00254}\mbox{\hyperlink{classkblib_1_1multi__span_a041d9ff5fe2b31df1c99e9b21c68d660}{00254}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_a041d9ff5fe2b31df1c99e9b21c68d660}{cend}}() const noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{const\_iterator}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00255}00255       \textcolor{keywordflow}{return} \{*\textcolor{keyword}{this}, \mbox{\hyperlink{namespacekblib_1_1fakestd_adb8781bc0e5d1ba4ca4624293c0c98ae}{size}}(), spans.end(), spans.back().second.begin()\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00256}00256    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00257}00257 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00258}\mbox{\hyperlink{classkblib_1_1multi__span_a06368d05f29d1e1d3b2ea6cb6f1706fd}{00258}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_a06368d05f29d1e1d3b2ea6cb6f1706fd}{rbegin}}() noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__span_a61e7db60d6ba6195f9b40926ad783f6d}{reverse\_iterator}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00259}00259       \textcolor{keywordflow}{return} \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{iterator}}\{*\textcolor{keyword}{this}, \mbox{\hyperlink{namespacekblib_1_1fakestd_adb8781bc0e5d1ba4ca4624293c0c98ae}{size}}(), spans.end(), spans.back().second.begin()\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00260}00260    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00261}\mbox{\hyperlink{classkblib_1_1multi__span_ad43036495bc1981690036d3dba6ce40c}{00261}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_ad43036495bc1981690036d3dba6ce40c}{rbegin}}() const noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__span_a9f20f78330e27c8d0e3cabd9fcf313c1}{const\_reverse\_iterator}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00262}00262       \textcolor{keywordflow}{return} \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{iterator}}\{*\textcolor{keyword}{this}, \mbox{\hyperlink{namespacekblib_1_1fakestd_adb8781bc0e5d1ba4ca4624293c0c98ae}{size}}(), spans.end(), spans.back().second.begin()\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00263}00263    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00264}\mbox{\hyperlink{classkblib_1_1multi__span_a09501017da2d00c23409d28c7113c92d}{00264}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_a09501017da2d00c23409d28c7113c92d}{crbegin}}() const noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__span_a9f20f78330e27c8d0e3cabd9fcf313c1}{const\_reverse\_iterator}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00265}00265       \textcolor{keywordflow}{return} \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{iterator}}\{*\textcolor{keyword}{this}, \mbox{\hyperlink{namespacekblib_1_1fakestd_adb8781bc0e5d1ba4ca4624293c0c98ae}{size}}(), spans.end(), spans.back().second.begin()\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00266}00266    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00267}00267 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00268}\mbox{\hyperlink{classkblib_1_1multi__span_a99b36c1e8f24f35ab5d986cd65959ae8}{00268}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_a99b36c1e8f24f35ab5d986cd65959ae8}{rend}}() noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__span_a61e7db60d6ba6195f9b40926ad783f6d}{reverse\_iterator}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00269}00269       \textcolor{keywordflow}{return} \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{iterator}}\{*\textcolor{keyword}{this}\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00270}00270    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00271}\mbox{\hyperlink{classkblib_1_1multi__span_ab79c57baf7ca205f2fada17fdbfba709}{00271}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_ab79c57baf7ca205f2fada17fdbfba709}{rend}}() const noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__span_a9f20f78330e27c8d0e3cabd9fcf313c1}{const\_reverse\_iterator}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00272}00272       \textcolor{keywordflow}{return} \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{iterator}}\{*\textcolor{keyword}{this}\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00273}00273    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00274}\mbox{\hyperlink{classkblib_1_1multi__span_a314bbe75fb65704a3672ae7ff09b7603}{00274}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_a314bbe75fb65704a3672ae7ff09b7603}{crend}}() const noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__span_a9f20f78330e27c8d0e3cabd9fcf313c1}{const\_reverse\_iterator}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00275}00275       \textcolor{keywordflow}{return} \mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{iterator}}\{*\textcolor{keyword}{this}\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00276}00276    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00277}00277 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00278}\mbox{\hyperlink{classkblib_1_1multi__span_aa82ed36998aad1b72143bf6129d496dd}{00278}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \mbox{\hyperlink{classkblib_1_1multi__span_ad948abab4de050b9f95feb1873e2b1b0}{reference}} \mbox{\hyperlink{classkblib_1_1multi__span_aa82ed36998aad1b72143bf6129d496dd}{operator[]}}(\mbox{\hyperlink{classkblib_1_1multi__span_ae023d7a28c73c4d5da3d0517369e8b41}{index\_type}} i)\textcolor{keyword}{ const }\{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00279}00279       \textcolor{keywordflow}{return} *\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{iterator}}\{*\textcolor{keyword}{this}, i\};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00280}00280    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00281}00281 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00282}00282    \textcolor{comment}{// see invariant on spans}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00283}\mbox{\hyperlink{classkblib_1_1multi__span_ab644fd3a7aa739b3a200c9bdbbb139e1}{00283}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_ab644fd3a7aa739b3a200c9bdbbb139e1}{size}}() const noexcept -\/> \mbox{\hyperlink{classkblib_1_1multi__span_ae023d7a28c73c4d5da3d0517369e8b41}{index\_type}} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00284}00284       \textcolor{keywordflow}{return} spans.back().first;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00285}00285    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00286}\mbox{\hyperlink{classkblib_1_1multi__span_ad860870630052d060ebaafc2b1c33b1d}{00286}}    \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_ad860870630052d060ebaafc2b1c33b1d}{empty}}() const noexcept -\/> \textcolor{keywordtype}{bool} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00287}00287       \textcolor{keywordflow}{return} spans.back().first == 0;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00288}00288    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00289}00289 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00290}\mbox{\hyperlink{classkblib_1_1multi__span_a73576b1d9621adebfe6952fdb5561543}{00290}}    \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1multi__span_a73576b1d9621adebfe6952fdb5561543}{diag}}(std::ostream\& os) \textcolor{keyword}{const} \textcolor{keyword}{noexcept} -\/> \textcolor{keywordtype}{void} \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00291}00291       os << \textcolor{stringliteral}{"{}Diagnostics: "{}} << spans.size() << \textcolor{charliteral}{'\(\backslash\)n'};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00292}00292       \textcolor{keywordflow}{for} (\textcolor{keyword}{auto}\& s : spans) \{}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00293}00293          os << \&s << \textcolor{charliteral}{'\(\backslash\)t'} << s.first << \textcolor{charliteral}{':'} << s.second.size() << \textcolor{charliteral}{'\(\backslash\)t'};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00294}00294          os << s.second.data() << \textcolor{charliteral}{','} << s.second.data() + s.second.size()}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00295}00295             << \textcolor{charliteral}{'\(\backslash\)n'};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00296}00296       \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00297}00297    \}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00298}00298 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00299}00299    \textcolor{comment}{// multi\_span<T> first(index\_type count) const}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00300}00300    \textcolor{comment}{// \{}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00301}00301 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00302}00302    \textcolor{comment}{// \}}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00303}00303    \textcolor{comment}{// multi\_span<T> last(index\_type count) const}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00304}00304    \textcolor{comment}{// \{}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00305}00305 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00306}00306    \textcolor{comment}{// \}}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00307}00307    \textcolor{comment}{// multi\_span<T> subspan(index\_type offset, index\_type count = -\/1) const}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00308}00308    \textcolor{comment}{// \{}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00309}00309    \textcolor{comment}{// if (count == -\/1) \{}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00310}00310    \textcolor{comment}{// count = size() -\/ offset;}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00311}00311    \textcolor{comment}{// \}}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00312}00312 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00313}00313    \textcolor{comment}{// \}}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00314}00314  \textcolor{keyword}{private}:}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00315}00315    \textcolor{keyword}{template} <\textcolor{keyword}{typename} U>}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00316}\mbox{\hyperlink{classkblib_1_1multi__span_aaf1cac960f14570b7a9e9db2c915cc74}{00316}}    \textcolor{keyword}{friend} \textcolor{keyword}{class }\mbox{\hyperlink{classkblib_1_1multi__impl_1_1mulspan__iterator}{multi\_impl::mulspan\_iterator}};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00317}00317    \textcolor{comment}{// invariant: holds one extra value, \{size, \{\}\}}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00318}00318    std::vector<multi\_impl::subspan\_t<T>> spans;}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00319}00319 \};}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00320}00320 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00321}00321 \} \textcolor{comment}{// namespace KBLIB\_NS}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00322}00322 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00323}00323 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00324}00324 }
\DoxyCodeLine{\Hypertarget{multi__span_8h_source_l00325}00325 \textcolor{preprocessor}{\#endif }\textcolor{comment}{// MULTI\_SPAN\_H}}

\end{DoxyCode}
