\hypertarget{enumerate-contrib-cry_8h_source}{}\doxysection{enumerate-\/contrib-\/cry.h}
\label{enumerate-contrib-cry_8h_source}\index{kblib/enumerate-\/contrib-\/cry.h@{kblib/enumerate-\/contrib-\/cry.h}}
\mbox{\hyperlink{enumerate-contrib-cry_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00001}00001 \textcolor{comment}{/* *****************************************************************************}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2020 Krystian Stasiowski}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00004}00004 \textcolor{comment}{ * This code adapted from code written by Krystian Stasiowski}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00005}00005 \textcolor{comment}{ * <sdkrystian@gmail.com>}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00007}00007 \textcolor{comment}{ * No specific license provisions were given, however permission was granted for}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00008}00008 \textcolor{comment}{ * me to include it in kblib.}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00010}00010 \textcolor{comment}{ * His code is much faster and cleaner than my magic\_enumerate is. HOWEVER, it}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00011}00011 \textcolor{comment}{ * is fundamentally unable to detect the copying-\/nonconst-\/from-\/const case.}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00012}00012 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00013}00013 \textcolor{comment}{ * My modifications are:}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00014}00014 \textcolor{comment}{ * -\/ Change from [val, idx] to [idx, val] to match Python's enumerate()}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00015}00015 \textcolor{comment}{ * -\/ Wrote documentation}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00016}00016 \textcolor{comment}{ * -\/ Change name from value\_and\_index() to cry\_enumerate()}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00017}00017 \textcolor{comment}{ * -\/ Silenced Clang warnings about std::tuple\_element specializations with}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00018}00018 \textcolor{comment}{ *   mismatched tags.}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00019}00019 \textcolor{comment}{ * -\/ Formatting}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00020}00020 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00021}00021 \textcolor{comment}{ * All credit for everything else goes to Krystian.}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00022}00022 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00023}00023 \textcolor{comment}{ * ****************************************************************************/}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00024}00024 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00025}00025 \textcolor{preprocessor}{\#ifndef ENUMERATECONTRIB\_H}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00026}00026 \textcolor{preprocessor}{\#define ENUMERATECONTRIB\_H}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00027}00027 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{tdecl_8h}{tdecl.h}}"{}}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00029}00029 \textcolor{preprocessor}{\#include <iterator>}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00030}00030 \textcolor{preprocessor}{\#include <type\_traits>}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00032}00032 \textcolor{preprocessor}{\#if KBLIB\_USE\_CXX17}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00034}00034 \textcolor{keyword}{namespace }\mbox{\hyperlink{tdecl_8h_a4b5c574c663a392148218cd4410fd7a1}{KBLIB\_NS}} \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00038}\mbox{\hyperlink{namespacekblib_1_1detail__cry}{00038}} \textcolor{keyword}{namespace }detail\_cry \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00039}00039    \textcolor{keyword}{template} <\textcolor{keyword}{typename}>}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00040}00040    \textcolor{keyword}{struct }\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair}{value\_index\_pair}};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00041}00041 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00042}00042    \textcolor{keyword}{template} <std::\textcolor{keywordtype}{size\_t} N, \textcolor{keyword}{typename} T, std::enable\_if\_t<N == 0>* = \textcolor{keywordtype}{nullptr}>}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00043}\mbox{\hyperlink{namespacekblib_1_1detail__cry_a515d82da8775f2e23dd0a40210d6ea00}{00043}}    \textcolor{keyword}{auto} \mbox{\hyperlink{namespacekblib_1_1detail__cry_a515d82da8775f2e23dd0a40210d6ea00}{get}}(T\&\& t)}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00044}00044        -\/> std::conditional\_t<std::is\_reference\_v<T>, \textcolor{keyword}{const} std::size\_t\&,}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00045}00045                              \textcolor{keyword}{const} std::size\_t> \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00046}00046       \textcolor{keywordflow}{return} t.index;}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00047}00047    \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00048}00048 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00049}00049    \textcolor{keyword}{template} <std::\textcolor{keywordtype}{size\_t} N, \textcolor{keyword}{typename} T, std::enable\_if\_t<N == 1>* = \textcolor{keywordtype}{nullptr}>}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00050}00050    \textcolor{keyword}{auto} \mbox{\hyperlink{namespacekblib_1_1detail__cry_a515d82da8775f2e23dd0a40210d6ea00}{get}}(T\&\& t)}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00051}00051        -\/> std::conditional\_t<std::is\_reference\_v<T>,}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00052}00052                              \textcolor{keyword}{typename} std::remove\_reference\_t<T>::value\_type\&,}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00053}00053                              \textcolor{keyword}{typename} std::remove\_reference\_t<T>::value\_type> \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00054}00054       \textcolor{comment}{// static\_assert(std::is\_reference\_v<T>);}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00055}00055       \textcolor{comment}{// static\_assert(}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00056}00056       \textcolor{comment}{//     std::is\_const\_v<std::remove\_reference\_t<decltype(*t.iter)>>);}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00057}00057       \textcolor{keywordflow}{return} *t.iter;}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00058}00058    \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00060}00060    \textcolor{keyword}{template} <\textcolor{keyword}{typename} Iterator>}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00061}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair}{00061}}    \textcolor{keyword}{struct }\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair}{value\_index\_pair}} \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00062}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a9cc5f41aaee5fc3f14be100ff00fdaf3}{00062}}       \textcolor{keyword}{using }\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a9cc5f41aaee5fc3f14be100ff00fdaf3}{value\_type}}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00063}00063           = std::remove\_reference\_t<decltype(*std::declval<Iterator\&>())>;}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00065}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a823db5d5075648fc9db2747b4951cb98}{00065}}       std::size\_t \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a823db5d5075648fc9db2747b4951cb98}{index}};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00066}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a1dc585b5aae174260cbc0c7098be7a38}{00066}}       Iterator \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a1dc585b5aae174260cbc0c7098be7a38}{iter}};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00067}00067    \};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00069}00069    \textcolor{keyword}{template} <\textcolor{keyword}{typename} Range, \textcolor{keyword}{typename} = \textcolor{keywordtype}{void}>}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00070}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base}{00070}}    \textcolor{keyword}{struct }\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base}{value\_and\_index\_base}} \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00071}00071     \textcolor{keyword}{public}:}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00072}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a12868338f08b4d2237ea094bfb811527}{00072}}       \textcolor{keyword}{using }\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a12868338f08b4d2237ea094bfb811527}{iterator\_type}} = \textcolor{keyword}{decltype}(std::begin(std::declval<Range\&>()));}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00074}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a6a7705274f853605cdd95e57faf3101c}{00074}}       \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a6a7705274f853605cdd95e57faf3101c}{value\_and\_index\_base}}(Range\& \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}})}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00075}00075           : range\_begin\_(\mbox{\hyperlink{namespacestd}{std}}::begin(\mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}))}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00076}00076           , range\_end\_(\mbox{\hyperlink{namespacestd}{std}}::end(\mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}})) \{\}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00077}00077 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00078}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_ad8bdb8c680f7286a054b7731bcf44ef9}{00078}}       \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_ad8bdb8c680f7286a054b7731bcf44ef9}{range\_begin}}() -\/> \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a12868338f08b4d2237ea094bfb811527}{iterator\_type}} \{ \textcolor{keywordflow}{return} range\_begin\_; \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00080}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a3fed8a9bf56cbc5e2a2832ae16ef8f6c}{00080}}       \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a3fed8a9bf56cbc5e2a2832ae16ef8f6c}{range\_end}}() -\/> \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a12868338f08b4d2237ea094bfb811527}{iterator\_type}} \{ \textcolor{keywordflow}{return} range\_end\_; \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00082}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a1673d8b3efe68bd7f5babea84e0ac67d}{00082}}       \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a12868338f08b4d2237ea094bfb811527}{iterator\_type}} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a1673d8b3efe68bd7f5babea84e0ac67d}{range\_begin\_}};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00083}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a836c1535a7831cbc2c8145158340c738}{00083}}       \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a12868338f08b4d2237ea094bfb811527}{iterator\_type}} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a836c1535a7831cbc2c8145158340c738}{range\_end\_}};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00084}00084    \};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00085}00085 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00086}00086    \textcolor{keyword}{template} <\textcolor{keyword}{typename} Range>}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00087}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6}{00087}}    \textcolor{keyword}{struct }\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base}{value\_and\_index\_base}}<}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00088}00088        Range, \mbox{\hyperlink{namespacestd}{std}}::\mbox{\hyperlink{namespacekblib_a366272ad8baad19be4ccf8128afb04a3}{enable\_if\_t}}<not std::is\_reference\_v<Range>>> \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00089}00089     \textcolor{keyword}{public}:}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00090}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6_aa47b686ad32f2e8a5b806ccf2eb8771e}{00090}}       \textcolor{keyword}{using }\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6_aa47b686ad32f2e8a5b806ccf2eb8771e}{iterator\_type}} = \textcolor{keyword}{decltype}(std::begin(std::declval<Range\&>()));}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00091}00091 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00092}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6_a2a9fde75b7aab2c1fbdaaef5bbfae32e}{00092}}       \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6_a2a9fde75b7aab2c1fbdaaef5bbfae32e}{value\_and\_index\_base}}(Range\& \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}})}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00093}00093           : range\_(\mbox{\hyperlink{namespacestd}{std}}::\mbox{\hyperlink{namespacekblib_a2cc6d0e618d41f45deaaa5c6c357ed7aa3734a903022249b3010be1897042568e}{move}}(\mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}})) \{\}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00095}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6_a2eb361174c5d2e679313bd3a267f9109}{00095}}       \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6_a2eb361174c5d2e679313bd3a267f9109}{range\_begin}}() -\/> \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6_aa47b686ad32f2e8a5b806ccf2eb8771e}{iterator\_type}} \{ \textcolor{keywordflow}{return} std::begin(range\_); \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00097}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6_aa142981d376d67cc7b3783431248af9b}{00097}}       \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6_aa142981d376d67cc7b3783431248af9b}{range\_end}}() -\/> \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6_aa47b686ad32f2e8a5b806ccf2eb8771e}{iterator\_type}} \{ \textcolor{keywordflow}{return} std::end(range\_); \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00099}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6_a79466fd67adb995dfdf99869c9f7240d}{00099}}       Range \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_3_01_range_00_01std_1_1enable__if__t_3_01nd2b4bc962477fd3675baa3a404be7df6_a79466fd67adb995dfdf99869c9f7240d}{range\_}};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00100}00100    \};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00102}00102    \textcolor{keyword}{template} <\textcolor{keyword}{typename} Range>}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00103}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl}{00103}}    \textcolor{keyword}{struct }\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl}{value\_and\_index\_impl}} : \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base}{value\_and\_index\_base}}<Range> \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00104}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_a0794bc8b1226eb2cbcf0dd1b8776e84f}{00104}}       \textcolor{keyword}{using }\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a12868338f08b4d2237ea094bfb811527}{iterator\_type}} = \textcolor{keyword}{typename} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base_a12868338f08b4d2237ea094bfb811527}{value\_and\_index\_base<Range>::iterator\_type}};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00105}00105 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00106}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_ab7a0871e62cb2f712ba39e54f580ccc1}{00106}}       \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_ab7a0871e62cb2f712ba39e54f580ccc1}{value\_and\_index\_impl}}(Range\& \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}})}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00107}00107           : \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__base}{value\_and\_index\_base}}<Range>(\mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}})}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00108}00108           , begin\_(this-\/>range\_begin(), 0)}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00109}00109           , end\_(this-\/>range\_end(), 0) \{\}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00111}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator}{00111}}       \textcolor{keyword}{struct }\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator}{iterator}} \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00112}00112        \textcolor{keyword}{private}:}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00113}00113          \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair}{value\_index\_pair<iterator\_type>}} pair\_;}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00115}00115        \textcolor{keyword}{public}:}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00116}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator_a3219f4b1d75150a333233b3fc66295aa}{00116}}          \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator_a3219f4b1d75150a333233b3fc66295aa}{iterator}}(\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_a0794bc8b1226eb2cbcf0dd1b8776e84f}{iterator\_type}} iter, std::size\_t index = 0)}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00117}00117              : pair\_\{index, iter\} \{\}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00119}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator_a985e3113f0120dfa5ef3106f166f6ea1}{00119}}          \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator_a985e3113f0120dfa5ef3106f166f6ea1}{operator*}}() -\/> \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair}{value\_index\_pair<iterator\_type>}}\& \{ \textcolor{keywordflow}{return} pair\_; \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00121}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator_a9e96a397082f2648bde85f48c0f576cc}{00121}}          \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator_a9e96a397082f2648bde85f48c0f576cc}{operator++}}(\textcolor{keywordtype}{int}) -\/> \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator}{iterator}} \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00122}00122             \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator}{iterator}} \mbox{\hyperlink{namespacekblib_ac912dd210d34963da9bd40a1a6296308}{copy}}(pair\_.\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a1dc585b5aae174260cbc0c7098be7a38}{iter}}, pair\_.\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a823db5d5075648fc9db2747b4951cb98}{index}});}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00123}00123             ++pair\_.\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a1dc585b5aae174260cbc0c7098be7a38}{iter}}, ++pair\_.\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a823db5d5075648fc9db2747b4951cb98}{index}};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00124}00124             \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_ac912dd210d34963da9bd40a1a6296308}{copy}};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00125}00125          \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00127}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator_a6dd6937ebe9d183f03a1aaf4c17c0636}{00127}}          \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator_a6dd6937ebe9d183f03a1aaf4c17c0636}{operator++}}() -\/> \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator}{iterator}}\& \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00128}00128             ++pair\_.\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a1dc585b5aae174260cbc0c7098be7a38}{iter}}, ++pair\_.\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a823db5d5075648fc9db2747b4951cb98}{index}};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00129}00129             \textcolor{keywordflow}{return} *\textcolor{keyword}{this};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00130}00130          \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00131}00131 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00132}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator_a3fda32787ed3a8553fd87f0ec388fba8}{00132}}          \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator_a3fda32787ed3a8553fd87f0ec388fba8}{operator==}}(\textcolor{keyword}{const} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator}{iterator}}\& other) \textcolor{keyword}{const} -\/> \textcolor{keywordtype}{bool} \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00133}00133             \textcolor{keywordflow}{return} other.pair\_.iter == pair\_.\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__index__pair_a1dc585b5aae174260cbc0c7098be7a38}{iter}};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00134}00134          \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00136}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator_a72ecde6b081569fd58ad9bd5b930b74a}{00136}}          \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator_a72ecde6b081569fd58ad9bd5b930b74a}{operator!=}}(\textcolor{keyword}{const} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator}{iterator}}\& other) \textcolor{keyword}{const} -\/> \textcolor{keywordtype}{bool} \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00137}00137             \textcolor{keywordflow}{return} not (other == *\textcolor{keyword}{this});}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00138}00138          \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00139}00139       \};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00140}00140 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00141}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_a927a378c03199db40f244d65b56a030f}{00141}}       \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_a927a378c03199db40f244d65b56a030f}{begin}}() -\/> \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator}{iterator}} \{ \textcolor{keywordflow}{return} begin\_; \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00142}00142 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00143}\mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_a47090829c59f270c3e31be95430c73dc}{00143}}       \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_a47090829c59f270c3e31be95430c73dc}{end}}() -\/> \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl_1_1iterator}{iterator}} \{ \textcolor{keywordflow}{return} end\_; \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00144}00144 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00145}00145     \textcolor{keyword}{private}:}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00146}00146       iterator begin\_;}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00147}00147       iterator end\_;}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00148}00148    \};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00149}00149 \} \textcolor{comment}{// namespace detail\_cry}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00150}00150 \} \textcolor{comment}{// namespace KBLIB\_NS}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00151}00151 \textcolor{keyword}{namespace }\mbox{\hyperlink{namespacestd}{std}} \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00152}00152 \textcolor{preprocessor}{\#  if defined(\_\_clang\_\_)}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00153}00153 \textcolor{comment}{// Fix from: https://github.com/nlohmann/json/issues/1401}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00154}00154 \textcolor{preprocessor}{\#     pragma clang diagnostic push}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00155}00155 \textcolor{preprocessor}{\#     pragma clang diagnostic ignored "{}-\/Wmismatched-\/tags"{}}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00156}00156 \textcolor{preprocessor}{\#  endif}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00157}00157 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00158}\mbox{\hyperlink{structstd_1_1tuple__size_3_01kblib_1_1detail__cry_1_1value__index__pair_3_01_t_01_4_01_4}{00158}} \textcolor{keyword}{struct }tuple\_size<\mbox{\hyperlink{namespacekblib}{kblib}}::detail\_cry::value\_index\_pair<T>> \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00159}\mbox{\hyperlink{structstd_1_1tuple__size_3_01kblib_1_1detail__cry_1_1value__index__pair_3_01_t_01_4_01_4_adcbcf4a274d6f59c1c1fb4aa98b8ef0a}{00159}}    \textcolor{keyword}{static} \textcolor{keyword}{constexpr} std::size\_t value = 2;}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00160}00160 \};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00161}00161 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00162}00162 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00163}\mbox{\hyperlink{structstd_1_1tuple__element_3_010_00_01kblib_1_1detail__cry_1_1value__index__pair_3_01_t_01_4_01_4}{00163}} \textcolor{keyword}{struct }tuple\_element<0, \mbox{\hyperlink{namespacekblib}{kblib}}::detail\_cry::value\_index\_pair<T>> \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00164}\mbox{\hyperlink{structstd_1_1tuple__element_3_010_00_01kblib_1_1detail__cry_1_1value__index__pair_3_01_t_01_4_01_4_afeac0c08bd23821242615c32d9d6d90d}{00164}}    \textcolor{keyword}{using }\mbox{\hyperlink{structstd_1_1tuple__element_3_010_00_01kblib_1_1detail__cry_1_1value__index__pair_3_01_t_01_4_01_4_afeac0c08bd23821242615c32d9d6d90d}{type}} = \textcolor{keyword}{const} std::size\_t;}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00165}00165 \};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00166}00166 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00167}00167 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00168}\mbox{\hyperlink{structstd_1_1tuple__element_3_011_00_01kblib_1_1detail__cry_1_1value__index__pair_3_01_t_01_4_01_4}{00168}} \textcolor{keyword}{struct }tuple\_element<1, \mbox{\hyperlink{namespacekblib}{kblib}}::detail\_cry::value\_index\_pair<T>> \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00169}\mbox{\hyperlink{structstd_1_1tuple__element_3_011_00_01kblib_1_1detail__cry_1_1value__index__pair_3_01_t_01_4_01_4_a46c67e1098382e2eea34875d6caa3552}{00169}}    \textcolor{keyword}{using }\mbox{\hyperlink{structstd_1_1tuple__element_3_011_00_01kblib_1_1detail__cry_1_1value__index__pair_3_01_t_01_4_01_4_a46c67e1098382e2eea34875d6caa3552}{type}} = std::remove\_reference\_t<decltype(*std::declval<T\&>())>;}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00170}00170 \};}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00171}00171 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00172}00172 \textcolor{preprocessor}{\#  if defined(\_\_clang\_\_)}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00173}00173 \textcolor{preprocessor}{\#     pragma clang diagnostic pop}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00174}00174 \textcolor{preprocessor}{\#  endif}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00175}00175 \} \textcolor{comment}{// namespace std}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00177}00177 \textcolor{keyword}{namespace }\mbox{\hyperlink{tdecl_8h_a4b5c574c663a392148218cd4410fd7a1}{KBLIB\_NS}} \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00178}00178 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00185}00185 \textcolor{keyword}{template} <\textcolor{keyword}{typename} Range>}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00186}\mbox{\hyperlink{namespacekblib_a679258c0b7423a4175f9ba848da99d96}{00186}} \textcolor{keyword}{auto} \mbox{\hyperlink{namespacekblib_a679258c0b7423a4175f9ba848da99d96}{cry\_enumerate}}(Range\&\& \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}) -\/> \textcolor{keyword}{auto} \{}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00187}00187    \textcolor{keywordflow}{return} \mbox{\hyperlink{structkblib_1_1detail__cry_1_1value__and__index__impl}{detail\_cry::value\_and\_index\_impl<Range>}}(\mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}});}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00188}00188 \}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00189}00189 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00190}00190 \} \textcolor{comment}{// namespace KBLIB\_NS}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00191}00191 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00192}00192 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{enumerate-contrib-cry_8h_source_l00194}00194 \textcolor{preprocessor}{\#endif }\textcolor{comment}{// ENUMERATECONTRIB\_H}}

\end{DoxyCode}
