\hypertarget{direct__map_8h_source}{}\doxysection{direct\+\_\+map.\+h} \label{direct__map_8h_source}\index{kblib/direct\_map.h@{kblib/direct\_map.h}} \mbox{\hyperlink{direct__map_8h}{Go to the documentation of this file.}} \begin{DoxyCode}{0} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00001}00001 \textcolor{comment}{/* *****************************************************************************}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00002}00002 \textcolor{comment}{ * kblib is a general utility library for C++14 and C++17, intended to provide}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00003}00003 \textcolor{comment}{ * performant high-\/level abstractions and more expressive ways to do simple}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00004}00004 \textcolor{comment}{ * things.}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00005}00005 \textcolor{comment}{ *}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00006}00006 \textcolor{comment}{ * Copyright (c) 2021 killerbee}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00007}00007 \textcolor{comment}{ *}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00008}00008 \textcolor{comment}{ * This program is free software: you can redistribute it and/or modify}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00009}00009 \textcolor{comment}{ * it under the terms of the GNU General Public License as published by}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00010}00010 \textcolor{comment}{ * the Free Software Foundation, either version 3 of the License, or}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00011}00011 \textcolor{comment}{ * (at your option) any later version.}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00012}00012 \textcolor{comment}{ *}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00013}00013 \textcolor{comment}{ * This program is distributed in the hope that it will be useful,}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00014}00014 \textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00015}00015 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00016}00016 \textcolor{comment}{ * GNU General Public License for more details.}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00017}00017 \textcolor{comment}{ *}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00018}00018 \textcolor{comment}{ * You should have received a copy of the GNU General Public License}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00019}00019 \textcolor{comment}{ * along with this program. If not, see .}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00020}00020 \textcolor{comment}{ * ****************************************************************************/}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00021}00021 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00031}00031 \textcolor{preprocessor}{\#ifndef DIRECT\_MAP\_H}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00032}00032 \textcolor{preprocessor}{\#define DIRECT\_MAP\_H}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00033}00033 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00034}00034 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{fakestd_8h}{kblib/fakestd.h}}>}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00035}00035 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{iterators_8h}{kblib/iterators.h}}>}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00036}00036 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{tdecl_8h}{kblib/tdecl.h}}>}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00037}00037 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00038}00038 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00039}00039 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00040}00040 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00041}00041 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00042}00042 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00043}00043 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00044}00044 \textcolor{preprocessor}{\#include }} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00045}00045 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00046}00046 \textcolor{keyword}{namespace }\mbox{\hyperlink{tdecl_8h_a4b5c574c663a392148218cd4410fd7a1}{KBLIB\_NS}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00047}00047 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00052}\mbox{\hyperlink{namespacekblib_1_1detail__direct__map}{00052}} \textcolor{keyword}{namespace }\mbox{\hyperlink{namespacedetail__direct__map}{detail\_direct\_map}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00053}00053 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00054}00054 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00055}\mbox{\hyperlink{namespacekblib_1_1detail__direct__map_a1ff7c111005e041185e913c407c2a912}{00055}} \mbox{\hyperlink{tdecl_8h_a35b356d58929dd3ae764e8291838f5be}{KBLIB\_CONSTANT}} \textcolor{keyword}{auto} \mbox{\hyperlink{namespacekblib_1_1detail__direct__map_a1ff7c111005e041185e913c407c2a912}{range\_of}}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00056}00056 = (std::numeric\_limits::digits + std::numeric\_limits::is\_signed} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00057}00057 < std::numeric\_limits::digits)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00058}00058 ? \textcolor{keyword}{static\_cast<}std::uintmax\_t\textcolor{keyword}{>}(1)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00059}00059 << \mbox{\hyperlink{namespacekblib_af9e250fffa2922e623baa08aa8994f54}{to\_unsigned}}(std::numeric\_limits::digits} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00060}00060 + std::numeric\_limits::is\_signed)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00061}00061 : 0;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00062}00062 \textcolor{keyword}{static\_assert}(range\_of == 1u << \mbox{\hyperlink{namespacekblib_af9e250fffa2922e623baa08aa8994f54}{to\_unsigned}}(CHAR\_BIT), \textcolor{stringliteral}{"{}"{}});} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00063}00063 \textcolor{keyword}{static\_assert}(range\_of == 1u << \mbox{\hyperlink{namespacekblib_af9e250fffa2922e623baa08aa8994f54}{to\_unsigned}}(CHAR\_BIT), \textcolor{stringliteral}{"{}"{}});} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00064}00064 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00065}00065 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T, \textcolor{keywordtype}{bool}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00066}00066 = std::is\_trivially\_default\_constructible::value and} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00067}00067 std::is\_trivially\_destructible::value>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00068}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for}{00068}} \textcolor{keyword}{struct }alignas(T) \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for}{storage\_for}} : \textcolor{keyword}{private} std::array \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00069}00069 \textcolor{keyword}{template} <} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00070}00070 \textcolor{keyword}{typename}... Args,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00071}00071 \mbox{\hyperlink{namespacekblib_a366272ad8baad19be4ccf8128afb04a3}{enable\_if\_t}}::value, \textcolor{keywordtype}{int}> = 0>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00072}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a09dcc8a3703d98055d886c650e102724}{00072}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a09dcc8a3703d98055d886c650e102724}{construct}}(Args\&\&... args) \textcolor{keyword}{noexcept}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00073}00073 std::is\_nothrow\_constructible::value) -\/> T\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00074}00074 \textcolor{keywordflow}{return} *\textcolor{keyword}{new} (this-\/>data()) T(std::forward(args)...);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00075}00075 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00076}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a5ab3e4ba8ad6e47282c391ff86f2305d}{00076}} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a5ab3e4ba8ad6e47282c391ff86f2305d}{storage\_for}}() = \textcolor{keywordflow}{default};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00077}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a9431e627f166e8687d997d18055a16cf}{00077}} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a9431e627f166e8687d997d18055a16cf}{storage\_for}}(\textcolor{keyword}{const} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for}{storage\_for}}\&) = \textcolor{keyword}{delete};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00078}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a5f9e3f18875b763921a2b5d45ffe1251}{00078}} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a5f9e3f18875b763921a2b5d45ffe1251}{storage\_for}}(\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for}{storage\_for}}\&\&) = \textcolor{keyword}{delete};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00079}00079 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00080}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a85350ba96b50e10fa206597df2a297d5}{00080}} \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a85350ba96b50e10fa206597df2a297d5}{operator=}}(\textcolor{keyword}{const} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for}{storage\_for}}\&) -\/> \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for}{storage\_for}}\& = \textcolor{keyword}{delete};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00081}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a445103c2cbf4323bb8d0dbc71180fbaf}{00081}} \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a445103c2cbf4323bb8d0dbc71180fbaf}{operator=}}(\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for}{storage\_for}}\&\&) -\/> \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for}{storage\_for}}\& = \textcolor{keyword}{delete};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00082}00082 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00083}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a7e41f2548370d5702879dd221466fa48}{00083}} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a7e41f2548370d5702879dd221466fa48}{\string~storage\_for}}() = \textcolor{keywordflow}{default};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00084}00084 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00085}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_aefe5be7b28bb28525c5b7a4693ad9246}{00085}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_aefe5be7b28bb28525c5b7a4693ad9246}{destroy}}() noexcept -\/> \textcolor{keywordtype}{void} \{ \mbox{\hyperlink{namespacekblib_a951945f1ed7d42562a7e6fa8cf8f0405}{get}}()-\/>\string~T(); \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00086}00086 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00087}00087 \textcolor{preprocessor}{\#if \_\_cpp\_lib\_launder}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00088}00088 \textcolor{preprocessor}{\# define LAUNDER(x) std::launder(x)}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00089}00089 \textcolor{preprocessor}{\#else}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00090}\mbox{\hyperlink{direct__map_8h_ae1f40bafdfd2ca76c38d961a2aee3dc0}{00090}} \textcolor{preprocessor}{\# define LAUNDER(x) (x)}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00091}00091 \textcolor{preprocessor}{\#endif}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00092}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a39614c2fd56f2e8d4c347a583b8e314d}{00092}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a39614c2fd56f2e8d4c347a583b8e314d}{get}}() \& \textcolor{keyword}{noexcept} -\/> T* \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00093}00093 \textcolor{keywordflow}{return} \mbox{\hyperlink{direct__map_8h_ae1f40bafdfd2ca76c38d961a2aee3dc0}{LAUNDER}}(\textcolor{keyword}{reinterpret\_cast<}T*\textcolor{keyword}{>}(this-\/>data()));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00094}00094 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00095}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a85ed9bc21bbc53ea6df4ed836b576269}{00095}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_a85ed9bc21bbc53ea6df4ed836b576269}{get}}() const\& noexcept -\/> const T* \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00096}00096 \textcolor{keywordflow}{return} \mbox{\hyperlink{direct__map_8h_ae1f40bafdfd2ca76c38d961a2aee3dc0}{LAUNDER}}(\textcolor{keyword}{reinterpret\_cast<}\textcolor{keyword}{const }T*\textcolor{keyword}{>}(this-\/>data()));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00097}00097 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00098}00098 \textcolor{preprocessor}{\#undef LAUNDER}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00099}00099 \};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00100}00100 \textcolor{keyword}{template} <\textcolor{keyword}{typename} T>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00101}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_3_01_t_00_01true_01_4}{00101}} \textcolor{keyword}{struct }\textcolor{keyword}{alignas}(T) \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_3_01_t_00_01true_01_4}{storage\_for}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00102}00102 \textcolor{keyword}{private}:} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00103}00103 T t;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00104}00104 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00105}00105 \textcolor{keyword}{public}:} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00106}00106 \textcolor{keyword}{template} <} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00107}00107 \textcolor{keyword}{typename}... Args,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00108}00108 \mbox{\hyperlink{namespacekblib_a366272ad8baad19be4ccf8128afb04a3}{enable\_if\_t}}::value, \textcolor{keywordtype}{int}> = 0>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00109}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_3_01_t_00_01true_01_4_adaa06188397abaa4c55c45f77bd99861}{00109}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_3_01_t_00_01true_01_4_adaa06188397abaa4c55c45f77bd99861}{construct}}(Args\&\&... args) \textcolor{keyword}{noexcept}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00110}00110 std::is\_nothrow\_constructible::value) -\/> T\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00111}00111 \textcolor{keywordflow}{return} *\textcolor{keyword}{new} (\&t) T(std::forward(args)...);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00112}00112 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00113}00113 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00114}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_3_01_t_00_01true_01_4_a29162adcaf317a9dc6999de942d8308d}{00114}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_3_01_t_00_01true_01_4_a29162adcaf317a9dc6999de942d8308d}{destroy}}() noexcept -\/> \textcolor{keywordtype}{void} \{\}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00115}00115 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00116}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_3_01_t_00_01true_01_4_a3747d79f6a821c6427d564df3a183206}{00116}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_3_01_t_00_01true_01_4_a3747d79f6a821c6427d564df3a183206}{get}}() \& \textcolor{keyword}{noexcept} -\/> T* \{ \textcolor{keywordflow}{return} \&t; \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00117}\mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_3_01_t_00_01true_01_4_a5421fe8dfead83cff479dd9fcbed94e8}{00117}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for_3_01_t_00_01true_01_4_a5421fe8dfead83cff479dd9fcbed94e8}{get}}() const\& noexcept -\/> const T* \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00118}00118 \textcolor{keywordflow}{return} \&t;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00119}00119 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00120}00120 \};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00121}00121 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00122}00122 \} \textcolor{comment}{// namespace detail\_direct\_map}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00123}00123 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00124}00124 \textcolor{keyword}{template} <\textcolor{keyword}{typename} Key, \textcolor{keyword}{typename} T, \textcolor{keyword}{typename} allocator = \textcolor{keywordtype}{void}>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00125}\mbox{\hyperlink{classkblib_1_1direct__map}{00125}} \textcolor{keyword}{class }\mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00126}00126 \textcolor{comment}{// Allocating direct\_map}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00127}00127 \textcolor{keyword}{public}:} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00128}\mbox{\hyperlink{classkblib_1_1direct__map_abfb6925b2730b68490baeb5035e55732}{00128}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_abfb6925b2730b68490baeb5035e55732}{key\_type}} = Key;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00129}\mbox{\hyperlink{classkblib_1_1direct__map_ad40bea53884503fd68933d29c0d68f16}{00129}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_ad40bea53884503fd68933d29c0d68f16}{mapped\_type}} = T;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00130}\mbox{\hyperlink{classkblib_1_1direct__map_ab550eb67d86bb0ca88c8faa1821e8cc9}{00130}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_ab550eb67d86bb0ca88c8faa1821e8cc9}{value\_type}} = std::pair;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00131}\mbox{\hyperlink{classkblib_1_1direct__map_a766b8e3092dfc7fcd63b95478ad53062}{00131}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_a766b8e3092dfc7fcd63b95478ad53062}{size\_type}} = std::size\_t;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00132}\mbox{\hyperlink{classkblib_1_1direct__map_aabec874b7256c263d05145cc7bb9b2a8}{00132}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_aabec874b7256c263d05145cc7bb9b2a8}{difference\_type}} = std::ptrdiff\_t;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00133}00133 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00134}\mbox{\hyperlink{classkblib_1_1direct__map_a74d021de263db0b32f0ad3384111a17a}{00134}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_a74d021de263db0b32f0ad3384111a17a}{reference}} = \mbox{\hyperlink{classkblib_1_1direct__map_ab550eb67d86bb0ca88c8faa1821e8cc9}{value\_type}}\&;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00135}\mbox{\hyperlink{classkblib_1_1direct__map_afec83c61a5f9efad6c1a389c2083982d}{00135}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_afec83c61a5f9efad6c1a389c2083982d}{const\_reference}} = \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map_ab550eb67d86bb0ca88c8faa1821e8cc9}{value\_type}}\&;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00136}\mbox{\hyperlink{classkblib_1_1direct__map_a3b6fbd8c34d1960ec850734a69756675}{00136}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_a3b6fbd8c34d1960ec850734a69756675}{pointer}} = \mbox{\hyperlink{classkblib_1_1direct__map_ab550eb67d86bb0ca88c8faa1821e8cc9}{value\_type}}*;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00137}\mbox{\hyperlink{classkblib_1_1direct__map_abe1d5f44dc10317e459b80a8b916f44c}{00137}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_abe1d5f44dc10317e459b80a8b916f44c}{const\_pointer}} = \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map_ab550eb67d86bb0ca88c8faa1821e8cc9}{value\_type}}*;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00138}00138 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00139}00139 \textcolor{keyword}{private}:} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00140}00140 \textcolor{keyword}{constexpr} \textcolor{keyword}{static} std::ptrdiff\_t key\_range\{detail\_direct\_map::range\_of\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00141}00141 \textcolor{keyword}{using }storage\_type = \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for}{detail\_direct\_map::storage\_for}};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00142}00142 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00143}00143 \textcolor{keyword}{using }held\_type} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00144}00144 = std::pair, std::array>;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00145}00145 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00146}00146 \textcolor{keyword}{template} <\textcolor{keyword}{typename} V>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00147}00147 \textcolor{keyword}{class }iter \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00148}00148 \textcolor{keyword}{public}:} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00149}00149 \mbox{\hyperlink{namespacekblib_af973fdd9c2dddf6db3744ae83902fc72}{copy\_const\_t}}* storage;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00150}00150 std::ptrdiff\_t pos;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00151}00151 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00152}00152 \textcolor{keyword}{constexpr} iter(\textcolor{keyword}{decltype}(storage) s, std::ptrdiff\_t p)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00153}00153 : storage(s)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00154}00154 , pos(p) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00155}00155 \textcolor{keywordflow}{if} (not storage) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00156}00156 pos = \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00157}00157 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00158}00158 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00159}00159 \textcolor{keyword}{constexpr} iter()} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00160}00160 : iter(nullptr, \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}()) \{\}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00161}00161 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00162}00162 \textcolor{keyword}{using }value\_type = \textcolor{keyword}{typename} direct\_map::value\_type;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00163}00163 \textcolor{keyword}{using }difference\_type = \textcolor{keyword}{typename} direct\_map::difference\_type;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00164}00164 \textcolor{keyword}{using }reference = copy\_const\_t\&;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00165}00165 \textcolor{keyword}{using }pointer = copy\_const\_t*;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00166}00166 \textcolor{keyword}{using }iterator\_category = std::bidirectional\_iterator\_tag;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00167}00167 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00168}00168 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{namespacekblib_ae2779c90b5c731d209e9cc1f555a18de}{operator*}}() const noexcept -\/> reference \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00169}00169 \textcolor{keywordflow}{return} *storage-\/>second[uindex(pos)].get();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00170}00170 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00171}00171 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator-\/>() const noexcept -\/> pointer \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00172}00172 \textcolor{keywordflow}{return} storage-\/>second[uindex(pos)].get();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00173}00173 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00174}00174 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00175}00175 \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator++() noexcept -\/> iter\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00176}00176 \textcolor{keywordflow}{if} (pos == \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}()) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00177}00177 \textcolor{comment}{// not required in general, but direct\_map::iterator guarantees that}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00178}00178 \textcolor{comment}{// ++end() == end() because it simplifies the implementation and is}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00179}00179 \textcolor{comment}{// unlikely to be a significant performance impact}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00180}00180 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00181}00181 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00182}00182 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} i : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(++pos, index(\mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}()))) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00183}00183 \textcolor{keywordflow}{if} (storage-\/>first.test(uindex(i))) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00184}00184 pos = i;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00185}00185 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00186}00186 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00187}00187 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00188}00188 pos = index(\mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00189}00189 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00190}00190 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00191}00191 \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator++(\textcolor{keywordtype}{int}) \textcolor{keyword}{noexcept} -\/> iter \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00192}00192 iter it = *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00193}00193 ++*\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00194}00194 \textcolor{keywordflow}{return} it;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00195}00195 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00196}00196 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00197}00197 \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator-\/-\/() noexcept -\/> iter\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00198}00198 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} i : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(pos -\/ 1, index(\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}()), -\/1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00199}00199 \textcolor{keywordflow}{if} (storage-\/>first.test(uindex(i))) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00200}00200 pos = i;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00201}00201 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00202}00202 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00203}00203 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00204}00204 pos = index(\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00205}00205 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00206}00206 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00207}00207 \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator-\/-\/(\textcolor{keywordtype}{int}) \textcolor{keyword}{noexcept} -\/> iter \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00208}00208 iter it = *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00209}00209 -\/-\/*\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00210}00210 \textcolor{keywordflow}{return} it;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00211}00211 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00212}00212 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00213}00213 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator==(iter l, iter r) \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00214}00214 -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00215}00215 \textcolor{keywordflow}{return} l.storage == r.storage and l.pos == r.pos;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00216}00216 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00217}00217 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator!=(iter l, iter r) \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00218}00218 -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00219}00219 \textcolor{keywordflow}{return} not (l == r);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00220}00220 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00221}00221 \textcolor{preprocessor}{\#define DECL\_OP(op) \(\backslash\)}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00222}00222 \textcolor{preprocessor}{ KBLIB\_NODISCARD friend constexpr auto operator op(iter l, \(\backslash\)}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00223}00223 \textcolor{preprocessor}{ iter r) noexcept-\/>bool \{ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00224}00224 \textcolor{preprocessor}{ assert(l.storage == r.storage); \(\backslash\)}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00225}00225 \textcolor{preprocessor}{ return l.pos op r.pos; \(\backslash\)}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00226}00226 \textcolor{preprocessor}{ \}}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00227}00227 \mbox{\hyperlink{direct__map_8h_acc6eda95e40b5568a75ac570237b36a3}{DECL\_OP}}(<)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00228}00228 \mbox{\hyperlink{direct__map_8h_acc6eda95e40b5568a75ac570237b36a3}{DECL\_OP}}(>)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00229}00229 \mbox{\hyperlink{direct__map_8h_acc6eda95e40b5568a75ac570237b36a3}{DECL\_OP}}(>=)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00230}00230 \mbox{\hyperlink{direct__map_8h_acc6eda95e40b5568a75ac570237b36a3}{DECL\_OP}}(<=)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00231}00231 \textcolor{preprocessor}{\#undef DECL\_OP}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00232}00232 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00233}00233 \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{swap}}(iter\& other) \textcolor{keyword}{noexcept} -\/> \textcolor{keywordtype}{void} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00234}00234 \mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{kblib::swap}}(storage, other.storage);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00235}00235 \mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{kblib::swap}}(pos, other.pos);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00236}00236 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00237}00237 \};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00238}00238 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00239}00239 \textcolor{keyword}{public}:} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00240}\mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{00240}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}} = iter;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00241}\mbox{\hyperlink{classkblib_1_1direct__map_aecd559581fb9156acefcb112cc688c96}{00241}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_aecd559581fb9156acefcb112cc688c96}{const\_iterator}} = iter;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00242}\mbox{\hyperlink{classkblib_1_1direct__map_ac79c9b08ef0e842fafe844609a38ea87}{00242}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_ac79c9b08ef0e842fafe844609a38ea87}{reverse\_iterator}} = std::reverse\_iterator;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00243}\mbox{\hyperlink{classkblib_1_1direct__map_a2c0510cad7af5216f434af19a98b70ac}{00243}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_a2c0510cad7af5216f434af19a98b70ac}{const\_reverse\_iterator}} = std::reverse\_iterator;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00244}00244 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00245}\mbox{\hyperlink{classkblib_1_1direct__map_af52cb3df55080b092eda3cc2cbb49aa3}{00245}} \textcolor{keyword}{constexpr} \mbox{\hyperlink{classkblib_1_1direct__map_af52cb3df55080b092eda3cc2cbb49aa3}{direct\_map}}() noexcept = default;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00246}00246 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00247}00247 template } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00248}\mbox{\hyperlink{classkblib_1_1direct__map_add6df604d7f0921326f2a41ccf31cb9c}{00248}} constexpr \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}(InputIt first, InputIt last)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00249}00249 : storage() \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00250}00250 \textcolor{keywordflow}{if} (first != last) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00251}00251 allocate();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00252}00252 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} v : \mbox{\hyperlink{namespacekblib_a893a2961c20b0657dffbbd2fe8f362c4}{indirect}}(first, last)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00253}00253 construct(v.first, v.second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00254}00254 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00255}00255 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00256}00256 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00257}00257 \textcolor{comment}{// TODO(killerbee13): copy construction for allocating direct\_map}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00258}\mbox{\hyperlink{classkblib_1_1direct__map_a2a5832e54ffedb9179e62f8dcdcb0d3b}{00258}} \textcolor{keyword}{constexpr} \mbox{\hyperlink{classkblib_1_1direct__map_a2a5832e54ffedb9179e62f8dcdcb0d3b}{direct\_map}}(\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& other)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00259}00259 : storage()} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00260}00260 , \_size(other.\_size) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00261}00261 \textcolor{keywordflow}{if} (not other.\mbox{\hyperlink{classkblib_1_1direct__map_a8cf8ade353ee332bf4161a95c3182907}{empty}}()) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00262}00262 allocate();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00263}00263 storage-\/>first = other.storage-\/>first;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00264}00264 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} \mbox{\hyperlink{structk}{k}} : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(+\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}() + 1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00265}00265 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(\mbox{\hyperlink{structk}{k}})) \{ \textcolor{comment}{// the bitmap is already copied from other}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00266}00266 do\_construct(\mbox{\hyperlink{structk}{k}}, other.\mbox{\hyperlink{classkblib_1_1direct__map_adc11cb65bf9ceb73cdc0817b60cedc73}{at}}(\mbox{\hyperlink{structk}{k}}));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00267}00267 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00268}00268 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00269}00269 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00270}00270 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00271}00271 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00272}\mbox{\hyperlink{classkblib_1_1direct__map_af9a290985384fd214dc52f53cf90fbb4}{00272}} \textcolor{keyword}{constexpr} \mbox{\hyperlink{classkblib_1_1direct__map_af9a290985384fd214dc52f53cf90fbb4}{direct\_map}}(\mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\&\& other) noexcept} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00273}00273 : storage(std::move(other.storage))} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00274}00274 , \_size(\mbox{\hyperlink{namespacekblib_a0c3f29dc7d19ffe01f977ce294ee537a}{std::exchange}}(other.\_size, 0)) \{\}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00275}00275 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00276}\mbox{\hyperlink{classkblib_1_1direct__map_aaee5c25ecf59da1803e1b08fbe1e118d}{00276}} \textcolor{keyword}{constexpr} \mbox{\hyperlink{classkblib_1_1direct__map_aaee5c25ecf59da1803e1b08fbe1e118d}{direct\_map}}(std::initializer\_list init)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00277}00277 : \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}(init.begin(), init.end()) \{\}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00278}00278 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00282}\mbox{\hyperlink{classkblib_1_1direct__map_ac06fcb187a5820f53829f8cf97a37818}{00282}} \mbox{\hyperlink{classkblib_1_1direct__map_ac06fcb187a5820f53829f8cf97a37818}{KBLIB\_CXX20}}(\textcolor{keyword}{constexpr}) \mbox{\hyperlink{classkblib_1_1direct__map}{\string~direct\_map}}() \{ clear(); \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00283}00283 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00284}\mbox{\hyperlink{classkblib_1_1direct__map_a3dbba0dd488249c67a98ecb8d7866ac8}{00284}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a3dbba0dd488249c67a98ecb8d7866ac8}{operator=}}(\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& other) -\/> \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00285}00285 \textcolor{keywordflow}{if} (\textcolor{keyword}{this} == \&other) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00286}00286 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00287}00287 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00288}00288 clear();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00289}00289 storage.assign(\mbox{\hyperlink{namespacekblib_af44abb883b069d84630176b4b8cd26f6}{in\_place\_agg}}, other.storage-\/>first);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00290}00290 \_size = other.\_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00291}00291 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} \mbox{\hyperlink{structk}{k}} : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(+\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}() + 1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00292}00292 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(\mbox{\hyperlink{structk}{k}})) \{ \textcolor{comment}{// the bitmap is already copied from other}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00293}00293 do\_construct(\mbox{\hyperlink{structk}{k}}, other.at(\mbox{\hyperlink{structk}{k}}));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00294}00294 bitmap().set(index(\mbox{\hyperlink{structk}{k}}));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00295}00295 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00296}00296 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00297}00297 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00298}00298 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00299}\mbox{\hyperlink{classkblib_1_1direct__map_ac240c63d8bf922e0b9af2da8d1fb800c}{00299}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_ac240c63d8bf922e0b9af2da8d1fb800c}{operator=}}(\mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\&\& other) \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00300}00300 -\/> \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& = \textcolor{keywordflow}{default};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00301}\mbox{\hyperlink{classkblib_1_1direct__map_ac52084ea19104a219a06250ee60b705b}{00301}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_ac52084ea19104a219a06250ee60b705b}{operator=}}(std::initializer\_list init)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00302}00302 -\/> \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00303}00303 clear();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00304}00304 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} it : init) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00305}00305 construct(it-\/>first, it-\/>second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00306}00306 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00307}00307 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00308}00308 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00309}00309 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00310}\mbox{\hyperlink{classkblib_1_1direct__map_adc11cb65bf9ceb73cdc0817b60cedc73}{00310}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_adc11cb65bf9ceb73cdc0817b60cedc73}{at}}(Key key) \& -\/> T\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00311}00311 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00312}00312 \textcolor{keywordflow}{return} unsafe\_at(key).get()-\/>second;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00313}00313 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00314}00314 \textcolor{keywordflow}{throw} std::out\_of\_range(\textcolor{stringliteral}{"{}direct\_map: key out of range"{}});} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00315}00315 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00316}00316 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00317}\mbox{\hyperlink{classkblib_1_1direct__map_a9f8770f02db3876f58c5d0f43ac38a3b}{00317}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a9f8770f02db3876f58c5d0f43ac38a3b}{at}}(Key key) \&\& -\/> T\&\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00318}00318 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00319}00319 \textcolor{keywordflow}{return} std::move(unsafe\_at(key).\mbox{\hyperlink{namespacekblib_a951945f1ed7d42562a7e6fa8cf8f0405}{get}}()-\/>second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00320}00320 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00321}00321 \textcolor{keywordflow}{throw} std::out\_of\_range(\textcolor{stringliteral}{"{}direct\_map: key out of range"{}});} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00322}00322 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00323}00323 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00324}\mbox{\hyperlink{classkblib_1_1direct__map_a3579fad3dbf44592fd2740b8237bae62}{00324}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a3579fad3dbf44592fd2740b8237bae62}{at}}(Key key) \textcolor{keyword}{const}\& -\/> \textcolor{keyword}{const} T\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00325}00325 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00326}00326 \textcolor{keywordflow}{return} unsafe\_at(key).get()-\/>second;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00327}00327 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00328}00328 \textcolor{keywordflow}{throw} std::out\_of\_range(\textcolor{stringliteral}{"{}direct\_map: key out of range"{}});} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00329}00329 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00330}00330 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00331}\mbox{\hyperlink{classkblib_1_1direct__map_aa0c20e2da243988b46bf3cd3cfc3b374}{00331}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_aa0c20e2da243988b46bf3cd3cfc3b374}{at}}(Key key) \textcolor{keyword}{const}\&\& -\/> \textcolor{keyword}{const} T\&\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00332}00332 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00333}00333 \textcolor{keywordflow}{return} std::move(unsafe\_at(key).\mbox{\hyperlink{namespacekblib_a951945f1ed7d42562a7e6fa8cf8f0405}{get}}()-\/>second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00334}00334 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00335}00335 \textcolor{keywordflow}{throw} std::out\_of\_range(\textcolor{stringliteral}{"{}direct\_map: key out of range"{}});} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00336}00336 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00337}00337 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00338}00338 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00339}\mbox{\hyperlink{classkblib_1_1direct__map_ae398c8298159f03df28bb6f9e6147f2f}{00339}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} T\& \mbox{\hyperlink{classkblib_1_1direct__map_ae398c8298159f03df28bb6f9e6147f2f}{operator[]}}(Key key) \textcolor{keyword}{noexcept}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00340}00340 std::is\_nothrow\_default\_constructible::value) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00341}00341 \textcolor{keywordflow}{return} try\_emplace(key).first-\/>second;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00342}00342 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00343}00343 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00344}\mbox{\hyperlink{classkblib_1_1direct__map_a64d05426ddc8ddcaed2a05bebf2a6601}{00344}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a64d05426ddc8ddcaed2a05bebf2a6601}{begin}}() \& \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00345}00345 \textcolor{keywordflow}{return} \{storage.get(), cbegin().pos\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00346}00346 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00347}\mbox{\hyperlink{classkblib_1_1direct__map_a135063c9f136316e6505c7d8da75c075}{00347}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a135063c9f136316e6505c7d8da75c075}{begin}}() const\& noexcept -\/> \mbox{\hyperlink{classkblib_1_1direct__map_aecd559581fb9156acefcb112cc688c96}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00348}00348 \textcolor{keywordflow}{return} \{storage.get(), cbegin().pos\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00349}00349 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00350}\mbox{\hyperlink{classkblib_1_1direct__map_a79f283bb95164f7f9ee670ccdd95af2e}{00350}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a79f283bb95164f7f9ee670ccdd95af2e}{cbegin}}() const\& noexcept -\/> \mbox{\hyperlink{classkblib_1_1direct__map_aecd559581fb9156acefcb112cc688c96}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00351}00351 \textcolor{keywordflow}{if} (not empty()) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00352}00352 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(to\_key(\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}()))) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00353}00353 \textcolor{keywordflow}{return} \{storage.get(), \mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}()\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00354}00354 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00355}00355 \textcolor{keywordflow}{return} ++\mbox{\hyperlink{classkblib_1_1direct__map_aecd559581fb9156acefcb112cc688c96}{const\_iterator}}\{storage.get(), \mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}()\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00356}00356 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00357}00357 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00358}00358 \textcolor{keywordflow}{return} end();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00359}00359 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00360}00360 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00361}00361 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00362}\mbox{\hyperlink{classkblib_1_1direct__map_aa1436add13cda09fe498d252bdf9bd89}{00362}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_aa1436add13cda09fe498d252bdf9bd89}{end}}() \& \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00363}00363 \textcolor{keywordflow}{return} \{storage.get(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}()\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00364}00364 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00365}\mbox{\hyperlink{classkblib_1_1direct__map_a5db653807423f3874ed5f1f8838e6935}{00365}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a5db653807423f3874ed5f1f8838e6935}{end}}() const\& noexcept -\/> \mbox{\hyperlink{classkblib_1_1direct__map_aecd559581fb9156acefcb112cc688c96}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00366}00366 \textcolor{keywordflow}{return} \{storage.get(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}()\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00367}00367 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00368}\mbox{\hyperlink{classkblib_1_1direct__map_ac52505f889acbb56b03afe65b565ee92}{00368}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_ac52505f889acbb56b03afe65b565ee92}{cend}}() const\& noexcept -\/> \mbox{\hyperlink{classkblib_1_1direct__map_aecd559581fb9156acefcb112cc688c96}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00369}00369 \textcolor{keywordflow}{return} \{storage.get(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}()\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00370}00370 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00371}00371 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00372}\mbox{\hyperlink{classkblib_1_1direct__map_a55ce1f9e521997b44b59e0901299f8fe}{00372}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a55ce1f9e521997b44b59e0901299f8fe}{rbegin}}() \& \textcolor{keyword}{noexcept} -\/> \textcolor{keyword}{auto} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00373}00373 \textcolor{keywordflow}{return} std::make\_reverse\_iterator(end());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00374}00374 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00375}\mbox{\hyperlink{classkblib_1_1direct__map_a39a94b8bb8e477ebf559e4def9a73167}{00375}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a39a94b8bb8e477ebf559e4def9a73167}{rbegin}}() const\& noexcept -\/> auto \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00376}00376 \textcolor{keywordflow}{return} std::make\_reverse\_iterator(end());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00377}00377 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00378}\mbox{\hyperlink{classkblib_1_1direct__map_a2f5812b49040568d1c4f6f24e22746cb}{00378}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a2f5812b49040568d1c4f6f24e22746cb}{crbegin}}() const\& noexcept -\/> auto \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00379}00379 \textcolor{keywordflow}{return} std::make\_reverse\_iterator(cend());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00380}00380 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00381}00381 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00382}\mbox{\hyperlink{classkblib_1_1direct__map_a4ca27536d112d61009e11e2d28972bba}{00382}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a4ca27536d112d61009e11e2d28972bba}{rend}}() \& \textcolor{keyword}{noexcept} -\/> \textcolor{keyword}{auto} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00383}00383 \textcolor{keywordflow}{return} std::make\_reverse\_iterator(begin());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00384}00384 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00385}\mbox{\hyperlink{classkblib_1_1direct__map_a069ac6077465a8783024e954ee68668c}{00385}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a069ac6077465a8783024e954ee68668c}{rend}}() const\& noexcept -\/> auto \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00386}00386 \textcolor{keywordflow}{return} std::make\_reverse\_iterator(begin());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00387}00387 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00388}\mbox{\hyperlink{classkblib_1_1direct__map_acc0c89de64778c4737020c9aa3b376de}{00388}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_acc0c89de64778c4737020c9aa3b376de}{crend}}() const\& noexcept -\/> auto \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00389}00389 \textcolor{keywordflow}{return} std::make\_reverse\_iterator(cbegin());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00390}00390 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00391}00391 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00392}\mbox{\hyperlink{classkblib_1_1direct__map_a8cf8ade353ee332bf4161a95c3182907}{00392}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a8cf8ade353ee332bf4161a95c3182907}{empty}}() const\& noexcept -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00393}00393 \textcolor{keywordflow}{return} \_size == 0;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00394}00394 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00395}00395 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00396}\mbox{\hyperlink{classkblib_1_1direct__map_a2e74994628fda131b7f2f99a40521d95}{00396}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a2e74994628fda131b7f2f99a40521d95}{size}}() const\& noexcept -\/> \mbox{\hyperlink{namespacestd}{std}}::\textcolor{keywordtype}{size\_t} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00397}00397 \textcolor{keywordflow}{return} \_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00398}00398 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00399}\mbox{\hyperlink{classkblib_1_1direct__map_a725c65f31cbee7cf970846fae31c6f5a}{00399}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a725c65f31cbee7cf970846fae31c6f5a}{ssize}}() const\& noexcept -\/> \mbox{\hyperlink{namespacestd}{std}}::ptrdiff\_t \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00400}00400 \textcolor{keywordflow}{return} \_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00401}00401 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00402}00402 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00403}\mbox{\hyperlink{classkblib_1_1direct__map_a655eb63b08a8c0e029b35062c509620a}{00403}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{static} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a655eb63b08a8c0e029b35062c509620a}{max\_size}}() noexcept -\/> \mbox{\hyperlink{namespacestd}{std}}::\textcolor{keywordtype}{size\_t} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00404}00404 \textcolor{keywordflow}{return} key\_range;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00405}00405 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00406}00406 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00407}\mbox{\hyperlink{classkblib_1_1direct__map_a293508a72f894d5bc9664089b2638334}{00407}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a293508a72f894d5bc9664089b2638334}{clear}}() noexcept -\/> \textcolor{keywordtype}{void} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00408}00408 \textcolor{keywordflow}{if} (\_size == 0) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00409}00409 \textcolor{keywordflow}{return};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00410}00410 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00411}00411 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} i : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(+\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}() + 1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00412}00412 \textcolor{keyword}{auto} j = \textcolor{keyword}{static\_cast<}Key\textcolor{keyword}{>}(i);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00413}00413 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(j)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00414}00414 unsafe\_at(j).destroy();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00415}00415 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00416}00416 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00417}00417 storage.reset();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00418}00418 \_size = 0;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00419}00419 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00420}00420 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00421}\mbox{\hyperlink{classkblib_1_1direct__map_a0d456bd2856fc024972ca60e28118038}{00421}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a0d456bd2856fc024972ca60e28118038}{insert}}(\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map_ab550eb67d86bb0ca88c8faa1821e8cc9}{value\_type}}\& value) -\/> std::pair \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00422}00422 \textcolor{keywordflow}{if} (not \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(value.first)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00423}00423 construct(value.first, value.second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00424}00424 \textcolor{keywordflow}{return} \{\{storage.get(), index(value.first)\}, \textcolor{keyword}{true}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00425}00425 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00426}00426 \textcolor{keywordflow}{return} \{\{storage.get(), index(value.first)\}, \textcolor{keyword}{false}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00427}00427 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00428}00428 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00429}00429 \textcolor{keyword}{template} <\textcolor{keyword}{typename} U>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00430}\mbox{\hyperlink{classkblib_1_1direct__map_af4336fc341c37643a0cf9bb75742fa9b}{00430}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_af4336fc341c37643a0cf9bb75742fa9b}{insert}}(U\&\& value)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00431}00431 -\/> \mbox{\hyperlink{namespacekblib_a366272ad8baad19be4ccf8128afb04a3}{enable\_if\_t::value}},} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00432}00432 std::pair> \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00433}00433 \textcolor{keywordflow}{if} (not \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(value.first)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00434}00434 construct(value.first, std::forward(value.second));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00435}00435 \textcolor{keywordflow}{return} \{\{storage.get(), index(value.first)\}, \textcolor{keyword}{true}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00436}00436 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00437}00437 \textcolor{keywordflow}{return} \{\{storage.get(), index(value.first)\}, \textcolor{keyword}{false}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00438}00438 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00439}00439 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00440}\mbox{\hyperlink{classkblib_1_1direct__map_adfa65fd014d1042a864363c79f249a1d}{00440}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_adfa65fd014d1042a864363c79f249a1d}{insert}}(\mbox{\hyperlink{classkblib_1_1direct__map_ab550eb67d86bb0ca88c8faa1821e8cc9}{value\_type}}\&\& value) -\/> std::pair \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00441}00441 \textcolor{keywordflow}{if} (not \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(value.first)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00442}00442 construct(value.first, std::move(value.second));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00443}00443 \textcolor{keywordflow}{return} \{\{storage.get(), index(value.first)\}, \textcolor{keyword}{true}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00444}00444 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00445}00445 \textcolor{keywordflow}{return} \{\{storage.get(), index(value.first)\}, \textcolor{keyword}{false}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00446}00446 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00447}00447 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00448}00448 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00449}00449 \textcolor{keyword}{template} <\textcolor{keyword}{typename} U>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00450}\mbox{\hyperlink{classkblib_1_1direct__map_a19df0b0ce2b442b309e4d2ddc51317d0}{00450}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a19df0b0ce2b442b309e4d2ddc51317d0}{insert\_or\_assign}}(Key key, U\&\& value)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00451}00451 -\/> std::pair \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00452}00452 \textcolor{keywordflow}{if} (not \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00453}00453 construct(key, std::forward(value));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00454}00454 \textcolor{keywordflow}{return} \{\{storage.get(), index(key)\}, \textcolor{keyword}{true}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00455}00455 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00456}00456 *unsafe\_at(key).get() = std::forward(value);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00457}00457 \textcolor{keywordflow}{return} \{\{storage.get(), index(key)\}, \textcolor{keyword}{false}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00458}00458 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00459}00459 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00460}00460 \textcolor{keyword}{template} <\textcolor{keyword}{typename}... Args>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00461}\mbox{\hyperlink{classkblib_1_1direct__map_a7b3d6e3c7e2ff8480b924226ee140b5e}{00461}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a7b3d6e3c7e2ff8480b924226ee140b5e}{try\_emplace}}(Key key, Args\&\&... args)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00462}00462 -\/> std::pair \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00463}00463 \textcolor{keywordflow}{if} (not \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00464}00464 construct(key, std::forward(args)...);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00465}00465 \textcolor{keywordflow}{return} \{\{storage.get(), index(key)\}, \textcolor{keyword}{true}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00466}00466 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00467}00467 \textcolor{keywordflow}{return} \{\{storage.get(), index(key)\}, \textcolor{keyword}{false}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00468}00468 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00469}00469 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00470}00470 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00471}\mbox{\hyperlink{classkblib_1_1direct__map_a3027d897a7327488599a815e2f0d4078}{00471}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a3027d897a7327488599a815e2f0d4078}{erase}}(\mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}} pos) \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00472}00472 assert(\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(to\_key(pos.pos)));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00473}00473 bitmap().reset(pos.pos);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00474}00474 unsafe\_at(to\_key(pos.pos)).destroy();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00475}00475 -\/-\/\_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00476}00476 \textcolor{keywordflow}{return} ++pos;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00477}00477 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00478}\mbox{\hyperlink{classkblib_1_1direct__map_a43152071e2de6921e3a6881be406edab}{00478}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a43152071e2de6921e3a6881be406edab}{erase}}(\mbox{\hyperlink{classkblib_1_1direct__map_aecd559581fb9156acefcb112cc688c96}{const\_iterator}} pos) \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00479}00479 assert(\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(to\_key(pos.pos)));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00480}00480 bitmap().reset(pos.pos);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00481}00481 unsafe\_at(to\_key(pos.pos)).destroy();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00482}00482 -\/-\/\_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00483}00483 \textcolor{keywordflow}{return} ++pos;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00484}00484 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00485}00485 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00486}\mbox{\hyperlink{classkblib_1_1direct__map_a62fd5f54fabcc92d37542674b81fc5bc}{00486}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a62fd5f54fabcc92d37542674b81fc5bc}{erase}}(\mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}} first, \mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}} last) \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00487}00487 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} i : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(first.pos, last.pos)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00488}00488 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(to\_key(i))) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00489}00489 bitmap().reset(i);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00490}00490 unsafe\_at(to\_key(i)).destroy();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00491}00491 -\/-\/\_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00492}00492 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00493}00493 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00494}00494 \textcolor{keywordflow}{return} ++last;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00495}00495 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00496}00496 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00497}\mbox{\hyperlink{classkblib_1_1direct__map_ad409fcea5d08a4af044227572dac8274}{00497}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_ad409fcea5d08a4af044227572dac8274}{erase}}(Key key) \textcolor{keyword}{noexcept} -\/> std::size\_t \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00498}00498 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00499}00499 bitmap().reset(index(key));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00500}00500 unsafe\_at(key).destroy();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00501}00501 -\/-\/\_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00502}00502 \textcolor{keywordflow}{return} 1;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00503}00503 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00504}00504 \textcolor{keywordflow}{return} 0;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00505}00505 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00506}00506 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00507}00507 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00508}\mbox{\hyperlink{classkblib_1_1direct__map_a893550488a35b199d28fe4d80da92f63}{00508}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a893550488a35b199d28fe4d80da92f63}{swap}}(\mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& other) \textcolor{keyword}{noexcept} -\/> \textcolor{keywordtype}{void} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00509}00509 \textcolor{keyword}{using }\mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{std::swap}};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00510}00510 \mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{swap}}(storage, other.storage);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00511}00511 \mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{swap}}(\_size, other.\_size);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00512}00512 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00513}00513 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00514}\mbox{\hyperlink{classkblib_1_1direct__map_a64c96d7850de6e87d9d988279538f0f2}{00514}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a64c96d7850de6e87d9d988279538f0f2}{contains}}(Key key) \textcolor{keyword}{const} \textcolor{keyword}{noexcept} -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00515}00515 \textcolor{keywordflow}{return} storage and bitmap().test(uindex(key));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00516}00516 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00517}\mbox{\hyperlink{classkblib_1_1direct__map_af9cd421ee757b9f39712f978ac26e62c}{00517}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_af9cd421ee757b9f39712f978ac26e62c}{count}}(Key key) \textcolor{keyword}{const} \textcolor{keyword}{noexcept} -\/> std::size\_t \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00518}00518 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00519}00519 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00520}00520 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00521}\mbox{\hyperlink{classkblib_1_1direct__map_a4213ba258b5d853916324e05e9d430b0}{00521}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a4213ba258b5d853916324e05e9d430b0}{find}}(Key key) \& \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00522}00522 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key) ? \mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}}\{storage.get(), index(key)\} : end();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00523}00523 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00524}\mbox{\hyperlink{classkblib_1_1direct__map_acf28998c23ccefbc77944f9439969eb0}{00524}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_acf28998c23ccefbc77944f9439969eb0}{find}}(Key key) \textcolor{keyword}{const}\& \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00525}00525 -\/> \mbox{\hyperlink{classkblib_1_1direct__map_aecd559581fb9156acefcb112cc688c96}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00526}00526 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key) ? \mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}}\{storage.get(), index(key)\} : end();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00527}00527 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00528}00528 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00529}\mbox{\hyperlink{classkblib_1_1direct__map_aa8e3a60faab81a570ea7dbbc377b3d3e}{00529}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_aa8e3a60faab81a570ea7dbbc377b3d3e}{equal\_range}}(Key key) \& \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00530}00530 -\/> std::pair \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00531}00531 \textcolor{keywordflow}{return} \{lower\_bound(key), upper\_bound(key)\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00532}00532 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00533}\mbox{\hyperlink{classkblib_1_1direct__map_a5626049388d987cd1b15f76c166e9eb2}{00533}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a5626049388d987cd1b15f76c166e9eb2}{equal\_range}}(Key key) \textcolor{keyword}{const}\& \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00534}00534 -\/> std::pair \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00535}00535 \textcolor{keywordflow}{return} \{lower\_bound(key), upper\_bound(key)\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00536}00536 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00537}00537 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00538}\mbox{\hyperlink{classkblib_1_1direct__map_ade4f6a2d6601dca8c9533deabe612eff}{00538}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_ade4f6a2d6601dca8c9533deabe612eff}{lower\_bound}}(Key key) \& \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00539}00539 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00540}00540 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_abc7f2ec97efdee8640fe38e73fe1fdad}{find}}(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00541}00541 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00542}00542 \textcolor{keywordflow}{return} ++\mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}}\{storage.get(), index(key)\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00543}00543 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00544}00544 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00545}\mbox{\hyperlink{classkblib_1_1direct__map_af6cb94a59ac396f236d205f67d606316}{00545}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_af6cb94a59ac396f236d205f67d606316}{lower\_bound}}(Key key) \textcolor{keyword}{const}\& \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00546}00546 -\/> \mbox{\hyperlink{classkblib_1_1direct__map_aecd559581fb9156acefcb112cc688c96}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00547}00547 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00548}00548 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_abc7f2ec97efdee8640fe38e73fe1fdad}{find}}(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00549}00549 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00550}00550 \textcolor{keywordflow}{return} ++\mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}}\{storage.get(), index(key)\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00551}00551 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00552}00552 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00553}00553 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00554}\mbox{\hyperlink{classkblib_1_1direct__map_ab86dbc02db18551517196c09d844c21a}{00554}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_ab86dbc02db18551517196c09d844c21a}{upper\_bound}}(Key key) \& \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_a0315880fd510fdae68eb986e4f2a22be}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00555}00555 \textcolor{comment}{// if the key exists, upper\_bound is the next one}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00556}00556 \textcolor{keyword}{auto} l = lower\_bound(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00557}00557 \textcolor{keywordflow}{if} (l.pos == index(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00558}00558 \textcolor{keywordflow}{return} ++l;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00559}00559 \textcolor{comment}{// otherwise upper\_bound == lower\_bound}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00560}00560 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00561}00561 \textcolor{keywordflow}{return} l;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00562}00562 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00563}00563 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00564}\mbox{\hyperlink{classkblib_1_1direct__map_a4921b0630277dff7f5b24f844da8ea63}{00564}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a4921b0630277dff7f5b24f844da8ea63}{upper\_bound}}(Key key) \textcolor{keyword}{const}\& \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00565}00565 -\/> \mbox{\hyperlink{classkblib_1_1direct__map_aecd559581fb9156acefcb112cc688c96}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00566}00566 \textcolor{comment}{// if the key exists, upper\_bound is the next one}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00567}00567 \textcolor{keyword}{auto} l = lower\_bound(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00568}00568 \textcolor{keywordflow}{if} (l.pos == index(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00569}00569 \textcolor{keywordflow}{return} ++l;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00570}00570 \textcolor{comment}{// otherwise upper\_bound == lower\_bound}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00571}00571 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00572}00572 \textcolor{keywordflow}{return} l;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00573}00573 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00574}00574 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00575}00575 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00576}\mbox{\hyperlink{classkblib_1_1direct__map_abf0c128c989837e369ee91144f89c66f}{00576}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{static} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_abf0c128c989837e369ee91144f89c66f}{min}}() noexcept -\/> Key \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00577}00577 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{std::numeric\_limits::min}}();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00578}00578 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00579}\mbox{\hyperlink{classkblib_1_1direct__map_a870b51638011c60b46ad460d22a7406e}{00579}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{static} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a870b51638011c60b46ad460d22a7406e}{max}}() noexcept -\/> Key \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00580}00580 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{std::numeric\_limits::max}}();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00581}00581 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00582}00582 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00583}\mbox{\hyperlink{classkblib_1_1direct__map_a4e692acc310450aef87b1551b0b8b5cc}{00583}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a4e692acc310450aef87b1551b0b8b5cc}{operator==}}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00584}00584 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& l,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00585}00585 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& r) \textcolor{keyword}{noexcept}(\textcolor{keyword}{noexcept}(std::declval()} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00586}00586 == std::declval())) -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00587}00587 \textcolor{keywordflow}{if} (l.size() != r.size()) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00588}00588 \textcolor{keywordflow}{return} \textcolor{keyword}{false};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00589}00589 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00590}00590 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} i : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{kblib::range}}(+\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}() + 1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00591}00591 \textcolor{keywordflow}{if} (l.contains(i) != r.contains(i)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00592}00592 \textcolor{keywordflow}{return} \textcolor{keyword}{false};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00593}00593 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (l.contains(i)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00594}00594 \textcolor{keywordflow}{if} (l.at(i) != r.at(i)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00595}00595 \textcolor{keywordflow}{return} \textcolor{keyword}{false};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00596}00596 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00597}00597 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00598}00598 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00599}00599 \textcolor{keywordflow}{return} \textcolor{keyword}{true};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00600}00600 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00601}00601 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00602}\mbox{\hyperlink{classkblib_1_1direct__map_add43d0a97298a03e566be7c51a6ad052}{00602}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_add43d0a97298a03e566be7c51a6ad052}{operator!=}}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00603}00603 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& l,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00604}00604 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& r) \textcolor{keyword}{noexcept}(\textcolor{keyword}{noexcept}(std::declval()} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00605}00605 == std::declval())) -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00606}00606 \textcolor{keywordflow}{return} not (l == r);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00607}00607 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00608}00608 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00609}\mbox{\hyperlink{classkblib_1_1direct__map_aee634c370a70d838e5960354695838d5}{00609}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_aee634c370a70d838e5960354695838d5}{operator<}}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00610}00610 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& l,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00611}00611 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& r) \textcolor{keyword}{noexcept}(\textcolor{keyword}{noexcept}(std::declval(),} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00612}00612 std::declval())) -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00613}00613 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_aec67bf14d264f3587e3b86645af62d2a}{kblib::lexicographical\_compare}}(l.begin(), l.end(), r.begin(),} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00614}00614 r.end());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00615}00615 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00616}\mbox{\hyperlink{classkblib_1_1direct__map_a993d8f410a720f0989b6415e8e8512a4}{00616}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a993d8f410a720f0989b6415e8e8512a4}{operator>}}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00617}00617 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& l,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00618}00618 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& r) \textcolor{keyword}{noexcept}(\textcolor{keyword}{noexcept}(std::declval(),} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00619}00619 std::declval())) -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00620}00620 \textcolor{keywordflow}{return} r < l;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00621}00621 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00622}\mbox{\hyperlink{classkblib_1_1direct__map_ac22602f67fafa4a1375cf22f4f814ee3}{00622}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_ac22602f67fafa4a1375cf22f4f814ee3}{operator<=}}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00623}00623 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& l,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00624}00624 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& r) \textcolor{keyword}{noexcept}(\textcolor{keyword}{noexcept}(std::declval(),} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00625}00625 std::declval())) -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00626}00626 \textcolor{keywordflow}{return} not (r < l);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00627}00627 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00628}\mbox{\hyperlink{classkblib_1_1direct__map_a63a63b7d1b078792f5ac3d2a406305cd}{00628}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a63a63b7d1b078792f5ac3d2a406305cd}{operator>=}}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00629}00629 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& l,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00630}00630 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& r) \textcolor{keyword}{noexcept}(\textcolor{keyword}{noexcept}(std::declval(),} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00631}00631 std::declval())) -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00632}00632 \textcolor{keywordflow}{return} not (l < r);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00633}00633 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00634}00634 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00635}\mbox{\hyperlink{classkblib_1_1direct__map_af0f60b693c4c3ffee3cb863a48e45bd4}{00635}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{static} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_af0f60b693c4c3ffee3cb863a48e45bd4}{index}}(Key key) \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00636}00636 -\/> std::ptrdiff\_t \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00637}00637 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_a1909a64960663825ccc4eb98e4637df2}{to\_signed}}(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00638}00638 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00639}\mbox{\hyperlink{classkblib_1_1direct__map_a80a2b42d10867914331a3b4cb6410a3d}{00639}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{static} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_a80a2b42d10867914331a3b4cb6410a3d}{uindex}}(Key key) \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00640}00640 -\/> std::size\_t \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00641}00641 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_af9e250fffa2922e623baa08aa8994f54}{to\_unsigned}}(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00642}00642 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00643}\mbox{\hyperlink{classkblib_1_1direct__map_afdce20dc1eab5e109e28d291fa00e824}{00643}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{static} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_afdce20dc1eab5e109e28d291fa00e824}{to\_key}}(std::ptrdiff\_t i) \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00644}00644 -\/> Key \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00645}00645 \textcolor{keywordflow}{return} Key(i);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00646}00646 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00647}00647 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00648}00648 \textcolor{keyword}{private}:} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00649}00649 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} bitmap() noexcept -\/> \mbox{\hyperlink{namespacestd}{std}}::bitset\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00650}00650 \textcolor{keywordflow}{return} storage-\/>first;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00651}00651 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00652}00652 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{const} std::bitset\& bitmap()} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00653}00653 const noexcept \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00654}00654 \textcolor{keywordflow}{return} storage-\/>first;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00655}00655 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00656}00656 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00657}00657 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} unsafe\_at(Key key) \& -\/> storage\_type\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00658}00658 \textcolor{keywordflow}{return} storage-\/>second[uindex(key)];} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00659}00659 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00660}00660 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} unsafe\_at(Key key) \&\& -\/> storage\_type\&\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00661}00661 \textcolor{keywordflow}{return} storage-\/>second[uindex(key)];} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00662}00662 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00663}00663 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} unsafe\_at(Key key) \textcolor{keyword}{const}\& -\/> \textcolor{keyword}{const}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00664}00664 storage\_type\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00665}00665 \textcolor{keywordflow}{return} storage-\/>second[uindex(key)];} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00666}00666 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00667}00667 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} unsafe\_at(Key key) \textcolor{keyword}{const}\&\& -\/> \textcolor{keyword}{const}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00668}00668 storage\_type\&\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00669}00669 \textcolor{keywordflow}{return} storage-\/>second[uindex(key)];} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00670}00670 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00671}00671 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00672}00672 \textcolor{keyword}{auto} allocate() -\/> \textcolor{keywordtype}{void} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00673}00673 \textcolor{keywordflow}{if} (not storage) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00674}00674 storage.assign();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00675}00675 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00676}00676 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00677}00677 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00678}00678 \textcolor{keyword}{template} <\textcolor{keyword}{typename}... Args>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00679}00679 \textcolor{keyword}{constexpr} \textcolor{keywordtype}{void} construct(Key key, Args\&\&... args) \textcolor{keyword}{noexcept}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00680}00680 std::is\_nothrow\_constructible::value) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00681}00681 allocate();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00682}00682 \textcolor{keywordflow}{if} (not storage-\/>first.test(uindex(key))) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00683}00683 do\_construct(key, std::forward(args)...);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00684}00684 \textcolor{comment}{// doing these after construction maintains exception safety.}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00685}00685 storage-\/>first.set(uindex(key));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00686}00686 ++\_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00687}00687 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00688}00688 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00689}00689 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00690}00690 \textcolor{keyword}{template} <\textcolor{keyword}{typename}... Args>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00691}00691 \textcolor{keyword}{constexpr} \textcolor{keywordtype}{void} do\_construct(Key key, Args\&\&... args) \textcolor{keyword}{noexcept}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00692}00692 std::is\_nothrow\_constructible::value) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00693}00693 storage-\/>second[uindex(key)].construct(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00694}00694 std::piecewise\_construct, std::forward\_as\_tuple(key),} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00695}00695 std::forward\_as\_tuple(std::forward(args)...));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00696}00696 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00697}00697 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00698}00698 \textcolor{comment}{// TODO(killerbee13): Implement, test, and document direct\_map}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00699}00699 \textcolor{comment}{// TODO(killerbee13): allocator support for direct\_map}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00700}00700 \mbox{\hyperlink{classkblib_1_1heap__value}{kblib::heap\_value}} storage;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00701}00701 std::size\_t \_size\{\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00702}00702 \};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00703}00703 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00704}00704 \textcolor{keyword}{template} <\textcolor{keyword}{typename} Key, \textcolor{keyword}{typename} T>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00705}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4}{00705}} \textcolor{keyword}{class }\mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00706}00706 \textcolor{comment}{// Non-\/allocating direct\_map}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00707}00707 \textcolor{keyword}{public}:} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00708}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a10eca596bac66992a3222416a9b19004}{00708}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a10eca596bac66992a3222416a9b19004}{key\_type}} = Key;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00709}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a7ca94e7ff6113e3bbbdc22c9ff928de7}{00709}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a7ca94e7ff6113e3bbbdc22c9ff928de7}{mapped\_type}} = T;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00710}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aee8a9dfd2ae9d26b817ffbb73874d3d9}{00710}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aee8a9dfd2ae9d26b817ffbb73874d3d9}{value\_type}} = std::pair;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00711}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a8af52916393d8c329c56e4ee738512d4}{00711}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a8af52916393d8c329c56e4ee738512d4}{size\_type}} = std::size\_t;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00712}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a93f26955b5e840cb0199e564eba00727}{00712}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a93f26955b5e840cb0199e564eba00727}{difference\_type}} = std::ptrdiff\_t;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00713}00713 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00714}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_afe166d1554e1ef9fe9a82e99510b33be}{00714}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_afe166d1554e1ef9fe9a82e99510b33be}{reference}} = \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aee8a9dfd2ae9d26b817ffbb73874d3d9}{value\_type}}\&;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00715}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aed365e799a15b53d76a7a1a1000c40c2}{00715}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aed365e799a15b53d76a7a1a1000c40c2}{const\_reference}} = \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aee8a9dfd2ae9d26b817ffbb73874d3d9}{value\_type}}\&;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00716}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a5074bc813bbb0abd98c507acd44ceba5}{00716}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a5074bc813bbb0abd98c507acd44ceba5}{pointer}} = \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aee8a9dfd2ae9d26b817ffbb73874d3d9}{value\_type}}*;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00717}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a58b081438bd46d62f6fa66e8737b49c2}{00717}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a58b081438bd46d62f6fa66e8737b49c2}{const\_pointer}} = \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aee8a9dfd2ae9d26b817ffbb73874d3d9}{value\_type}}*;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00718}00718 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00719}00719 \textcolor{keyword}{private}:} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00720}00720 \textcolor{keyword}{constexpr} \textcolor{keyword}{static} std::ptrdiff\_t key\_range\{detail\_direct\_map::range\_of\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00721}00721 \textcolor{keyword}{using }storage\_type = \mbox{\hyperlink{structkblib_1_1detail__direct__map_1_1storage__for}{detail\_direct\_map::storage\_for}};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00722}00722 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00723}00723 \textcolor{keyword}{template} <\textcolor{keyword}{typename} V>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00724}00724 \textcolor{keyword}{class }iter \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00725}00725 \textcolor{keyword}{public}:} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00726}00726 \mbox{\hyperlink{namespacekblib_af973fdd9c2dddf6db3744ae83902fc72}{copy\_const\_t}}* \mbox{\hyperlink{namespacekblib_a1490492d82c28f195f0f44a9d88fb2cc}{map}};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00727}00727 std::ptrdiff\_t pos;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00728}00728 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00729}00729 \textcolor{keyword}{constexpr} iter(\textcolor{keyword}{decltype}(\mbox{\hyperlink{namespacekblib_a1490492d82c28f195f0f44a9d88fb2cc}{map}}) s, std::ptrdiff\_t p)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00730}00730 : \mbox{\hyperlink{namespacekblib_a1490492d82c28f195f0f44a9d88fb2cc}{map}}(s)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00731}00731 , pos(p) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00732}00732 \textcolor{keywordflow}{if} (not \mbox{\hyperlink{namespacekblib_a1490492d82c28f195f0f44a9d88fb2cc}{map}}) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00733}00733 pos = \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00734}00734 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00735}00735 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00736}00736 \textcolor{keyword}{constexpr} iter()} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00737}00737 : iter(nullptr, \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}()) \{\}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00738}00738 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00739}00739 \textcolor{keyword}{using }value\_type = \textcolor{keyword}{typename} direct\_map::value\_type;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00740}00740 \textcolor{keyword}{using }difference\_type = \textcolor{keyword}{typename} direct\_map::difference\_type;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00741}00741 \textcolor{keyword}{using }reference = copy\_const\_t\&;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00742}00742 \textcolor{keyword}{using }pointer = copy\_const\_t*;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00743}00743 \textcolor{keyword}{using }iterator\_category = std::bidirectional\_iterator\_tag;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00744}00744 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00745}00745 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{namespacekblib_ae2779c90b5c731d209e9cc1f555a18de}{operator*}}() const -\/> reference \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00746}00746 \textcolor{keywordflow}{return} *\mbox{\hyperlink{namespacekblib_a1490492d82c28f195f0f44a9d88fb2cc}{map}}-\/>elems[uindex(pos)].get();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00747}00747 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00748}00748 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator-\/>() const -\/> pointer \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00749}00749 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_a1490492d82c28f195f0f44a9d88fb2cc}{map}}-\/>elems[uindex(pos)].get();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00750}00750 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00751}00751 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00752}00752 \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator++() -\/> iter\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00753}00753 \textcolor{keywordflow}{if} (pos == \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}()) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00754}00754 \textcolor{comment}{// not required in general, but direct\_map::iterator guarantees that}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00755}00755 \textcolor{comment}{// ++end() == end() because it simplifies the implementation and is}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00756}00756 \textcolor{comment}{// unlikely to be a significant performance impact}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00757}00757 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00758}00758 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00759}00759 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} i : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(++pos, index(\mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}()))) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00760}00760 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a1490492d82c28f195f0f44a9d88fb2cc}{map}}-\/>active\_elems.test(uindex(i))) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00761}00761 pos = i;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00762}00762 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00763}00763 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00764}00764 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00765}00765 pos = index(\mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00766}00766 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00767}00767 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00768}00768 \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator++(\textcolor{keywordtype}{int}) -\/> iter \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00769}00769 iter it = *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00770}00770 ++*\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00771}00771 \textcolor{keywordflow}{return} it;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00772}00772 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00773}00773 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00774}00774 \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator-\/-\/() -\/> iter\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00775}00775 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} i : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(pos -\/ 1, index(\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}()), -\/1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00776}00776 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a1490492d82c28f195f0f44a9d88fb2cc}{map}}-\/>active\_elems.test(uindex(i))) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00777}00777 pos = i;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00778}00778 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00779}00779 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00780}00780 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00781}00781 pos = index(\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00782}00782 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00783}00783 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00784}00784 \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator-\/-\/(\textcolor{keywordtype}{int}) -\/> iter \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00785}00785 iter it = *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00786}00786 -\/-\/*\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00787}00787 \textcolor{keywordflow}{return} it;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00788}00788 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00789}00789 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00790}00790 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator==(iter l, iter r) \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00791}00791 -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00792}00792 \textcolor{keywordflow}{return} l.map == r.map and l.pos == r.pos;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00793}00793 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00794}00794 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} operator!=(iter l, iter r) \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00795}00795 -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00796}00796 \textcolor{keywordflow}{return} not (l == r);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00797}00797 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00798}00798 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00799}\mbox{\hyperlink{direct__map_8h_acc6eda95e40b5568a75ac570237b36a3}{00799}} \textcolor{preprocessor}{\#define DECL\_OP(op) \(\backslash\)}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00800}00800 \textcolor{preprocessor}{ KBLIB\_NODISCARD friend constexpr auto operator op(iter l, \(\backslash\)}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00801}00801 \textcolor{preprocessor}{ iter r) noexcept-\/>bool \{ \(\backslash\)}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00802}00802 \textcolor{preprocessor}{ assert(l.map == r.map); \(\backslash\)}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00803}00803 \textcolor{preprocessor}{ return l.pos op r.pos; \(\backslash\)}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00804}00804 \textcolor{preprocessor}{ \}}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00805}00805 \mbox{\hyperlink{direct__map_8h_acc6eda95e40b5568a75ac570237b36a3}{DECL\_OP}}(<)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00806}00806 \mbox{\hyperlink{direct__map_8h_acc6eda95e40b5568a75ac570237b36a3}{DECL\_OP}}(>)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00807}00807 \mbox{\hyperlink{direct__map_8h_acc6eda95e40b5568a75ac570237b36a3}{DECL\_OP}}(>=)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00808}00808 \mbox{\hyperlink{direct__map_8h_acc6eda95e40b5568a75ac570237b36a3}{DECL\_OP}}(<=)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00809}00809 \textcolor{preprocessor}{\#undef DECL\_OP}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00810}00810 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00811}00811 \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{swap}}(iter\& other) \textcolor{keyword}{noexcept} -\/> \textcolor{keywordtype}{void} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00812}00812 \mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{kblib::swap}}(\mbox{\hyperlink{namespacekblib_a1490492d82c28f195f0f44a9d88fb2cc}{map}}, other.map);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00813}00813 \mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{kblib::swap}}(pos, other.pos);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00814}00814 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00815}00815 \};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00816}00816 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00817}00817 \textcolor{keyword}{public}:} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00818}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{00818}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}} = iter;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00819}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4b45a8eae2479be3d78c91a6c40b0b3b}{00819}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4b45a8eae2479be3d78c91a6c40b0b3b}{const\_iterator}} = iter;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00820}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a8a8982b3e38e9968b7d6d4e19a167f25}{00820}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a8a8982b3e38e9968b7d6d4e19a167f25}{reverse\_iterator}} = std::reverse\_iterator;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00821}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a66da3b82528846a1d1d2498f194ce0bd}{00821}} \textcolor{keyword}{using }\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a66da3b82528846a1d1d2498f194ce0bd}{const\_reverse\_iterator}} = std::reverse\_iterator;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00822}00822 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00823}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a8ca18c9d79f12ce63f774b1562cf48d9}{00823}} \textcolor{keyword}{constexpr} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a8ca18c9d79f12ce63f774b1562cf48d9}{direct\_map}}() noexcept = default;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00824}00824 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00825}00825 template } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00826}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a930737e31d35dabd62ee9786105bb639}{00826}} constexpr \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}(InputIt first, InputIt last) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00827}00827 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto}\&\& v : \mbox{\hyperlink{namespacekblib_a893a2961c20b0657dffbbd2fe8f362c4}{indirect}}(first, last)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00828}00828 construct(std::forward<\textcolor{keyword}{decltype}(v)>(v).first,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00829}00829 std::forward<\textcolor{keyword}{decltype}(v)>(v).second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00830}00830 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00831}00831 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00832}00832 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00833}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a7f2b46fd045fa8e623a76d097c9f44fe}{00833}} \textcolor{keyword}{constexpr} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a7f2b46fd045fa8e623a76d097c9f44fe}{direct\_map}}(\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& other)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00834}00834 : active\_elems\{other.active\_elems\}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00835}00835 , \_size(other.\_size) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00836}00836 \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a10eca596bac66992a3222416a9b19004}{key\_type}} \mbox{\hyperlink{structk}{k}} : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(+\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}() + 1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00837}00837 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(\mbox{\hyperlink{structk}{k}})) \{ \textcolor{comment}{// the bitmap is already copied from other}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00838}00838 do\_construct(\mbox{\hyperlink{structk}{k}}, other.unsafe\_at(\mbox{\hyperlink{structk}{k}}).get()-\/>second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00839}00839 bitmap().set(uindex(\mbox{\hyperlink{structk}{k}}));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00840}00840 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00841}00841 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00842}00842 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00843}00843 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00844}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a832d9d13ec890e6306aa19e61d75fb03}{00844}} \textcolor{keyword}{constexpr} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a832d9d13ec890e6306aa19e61d75fb03}{direct\_map}}(\mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\&\& other) \textcolor{keyword}{noexcept}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00845}00845 std::is\_nothrow\_move\_constructible::value)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00846}00846 : active\_elems\{other.active\_elems\}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00847}00847 , \_size(other.\_size) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00848}00848 \textcolor{keywordflow}{for} (\textcolor{keyword}{const} key\_type \mbox{\hyperlink{structk}{k}} : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(+\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}() + 1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00849}00849 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(\mbox{\hyperlink{structk}{k}})) \{ \textcolor{comment}{// the bitmap is already copied from other}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00850}00850 do\_construct(\mbox{\hyperlink{structk}{k}}, std::move(other.unsafe\_at(\mbox{\hyperlink{structk}{k}}).get()-\/>second));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00851}00851 bitmap().set(uindex(\mbox{\hyperlink{structk}{k}}));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00852}00852 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00853}00853 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00854}00854 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00855}00855 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00856}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a9c7480a4f2ea1f34896b4505fd44f75c}{00856}} \textcolor{keyword}{constexpr} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a9c7480a4f2ea1f34896b4505fd44f75c}{direct\_map}}(std::initializer\_list init)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00857}00857 : \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}(init.begin(), init.end()) \{\}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00858}00858 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00859}00859 \textcolor{comment}{// TODO(killerbee13): Remove this and allow it to be trivially destructible}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00860}00860 \textcolor{comment}{// for trivial Key and T}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00861}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_abef4d675622c7755e757dcf9a4e88abf}{00861}} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_abef4d675622c7755e757dcf9a4e88abf}{KBLIB\_CXX20}}(\textcolor{keyword}{constexpr}) \mbox{\hyperlink{classkblib_1_1direct__map}{\string~direct\_map}}() \{ clear(); \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00862}00862 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00863}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ae1f8c629217d7e8bb5a8f2bcdbf5a589}{00863}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ae1f8c629217d7e8bb5a8f2bcdbf5a589}{operator=}}(\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& other) -\/> \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00864}00864 \textcolor{keywordflow}{if} (\textcolor{keyword}{this} == \&other) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00865}00865 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00866}00866 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00867}00867 clear();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00868}00868 active\_elems = other.active\_elems;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00869}00869 \_size = other.\_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00870}00870 \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a10eca596bac66992a3222416a9b19004}{key\_type}} \mbox{\hyperlink{structk}{k}} : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(+\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}() + 1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00871}00871 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(\mbox{\hyperlink{structk}{k}})) \{ \textcolor{comment}{// the bitmap is already copied from other}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00872}00872 do\_construct(\mbox{\hyperlink{structk}{k}}, other.unsafe\_at(\mbox{\hyperlink{structk}{k}}).get()-\/>second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00873}00873 bitmap().set(uindex(\mbox{\hyperlink{structk}{k}}));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00874}00874 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00875}00875 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00876}00876 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00877}00877 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00878}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a671eb3578bf7855a7db26e96d100ccad}{00878}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a671eb3578bf7855a7db26e96d100ccad}{operator=}}(\mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\&\& other) \textcolor{keyword}{noexcept}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00879}00879 std::is\_nothrow\_move\_constructible::value) -\/> \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00880}00880 \textcolor{keywordflow}{if} (\textcolor{keyword}{this} == \&other) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00881}00881 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00882}00882 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00883}00883 active\_elems = other.active\_elems;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00884}00884 \_size = other.\_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00885}00885 \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a10eca596bac66992a3222416a9b19004}{key\_type}} \mbox{\hyperlink{structk}{k}} : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(+\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}() + 1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00886}00886 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(\mbox{\hyperlink{structk}{k}})) \{ \textcolor{comment}{// the bitmap is already copied from other}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00887}00887 do\_construct(\mbox{\hyperlink{structk}{k}}, std::move(other.unsafe\_at(\mbox{\hyperlink{structk}{k}}).get()-\/>second));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00888}00888 bitmap().set(uindex(\mbox{\hyperlink{structk}{k}}));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00889}00889 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00890}00890 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00891}00891 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00892}00892 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00893}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ae64b9bd4313352aae3c515b1bddd9c24}{00893}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ae64b9bd4313352aae3c515b1bddd9c24}{operator=}}(std::initializer\_list init)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00894}00894 -\/> \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00895}00895 clear();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00896}00896 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} it : init) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00897}00897 construct(it-\/>first, it-\/>second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00898}00898 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00899}00899 \textcolor{keywordflow}{return} *\textcolor{keyword}{this};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00900}00900 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00901}00901 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00902}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a8851c9c4d7093616dd4e89f5da5bca48}{00902}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a8851c9c4d7093616dd4e89f5da5bca48}{at}}(Key key) \& -\/> T\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00903}00903 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00904}00904 \textcolor{keywordflow}{return} unsafe\_at(key).get()-\/>second;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00905}00905 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00906}00906 \textcolor{keywordflow}{throw} std::out\_of\_range(\textcolor{stringliteral}{"{}direct\_map: key out of range"{}});} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00907}00907 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00908}00908 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00909}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a71667e875237a974d5554285d154d183}{00909}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a71667e875237a974d5554285d154d183}{at}}(Key key) \&\& -\/> T\&\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00910}00910 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00911}00911 \textcolor{keywordflow}{return} std::move(unsafe\_at(key).\mbox{\hyperlink{namespacekblib_a951945f1ed7d42562a7e6fa8cf8f0405}{get}}()-\/>second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00912}00912 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00913}00913 \textcolor{keywordflow}{throw} std::out\_of\_range(\textcolor{stringliteral}{"{}direct\_map: key out of range"{}});} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00914}00914 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00915}00915 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00916}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a288333d24a5f0d27799663a4c1ee086c}{00916}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a288333d24a5f0d27799663a4c1ee086c}{at}}(Key key) \textcolor{keyword}{const}\& -\/> \textcolor{keyword}{const} T\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00917}00917 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00918}00918 \textcolor{keywordflow}{return} unsafe\_at(key).get()-\/>second;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00919}00919 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00920}00920 \textcolor{keywordflow}{throw} std::out\_of\_range(\textcolor{stringliteral}{"{}direct\_map: key out of range"{}});} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00921}00921 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00922}00922 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00923}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a892bb453fcc21a853e9a313a3cd41f5e}{00923}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a892bb453fcc21a853e9a313a3cd41f5e}{at}}(Key key) \textcolor{keyword}{const}\&\& -\/> \textcolor{keyword}{const} T\&\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00924}00924 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00925}00925 \textcolor{keywordflow}{return} std::move(unsafe\_at(key).\mbox{\hyperlink{namespacekblib_a951945f1ed7d42562a7e6fa8cf8f0405}{get}}()-\/>second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00926}00926 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00927}00927 \textcolor{keywordflow}{throw} std::out\_of\_range(\textcolor{stringliteral}{"{}direct\_map: key out of range"{}});} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00928}00928 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00929}00929 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00930}00930 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00931}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a85648142f3f31ead8597eb19b015d05b}{00931}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} T\& \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a85648142f3f31ead8597eb19b015d05b}{operator[]}}(Key key) \textcolor{keyword}{noexcept}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00932}00932 std::is\_nothrow\_default\_constructible::value) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00933}00933 \textcolor{keywordflow}{return} try\_emplace(key).first-\/>second;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00934}00934 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00935}00935 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00936}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ae69a9e599ad14044c430e6b9d31b6133}{00936}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ae69a9e599ad14044c430e6b9d31b6133}{begin}}() \& \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00937}00937 \textcolor{keywordflow}{return} \{\textcolor{keyword}{this}, cbegin().pos\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00938}00938 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00939}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a99bdd73bdf0442bf325a1af493bb30e8}{00939}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a99bdd73bdf0442bf325a1af493bb30e8}{begin}}() const\& noexcept -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4b45a8eae2479be3d78c91a6c40b0b3b}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00940}00940 \textcolor{keywordflow}{return} \{\textcolor{keyword}{this}, cbegin().pos\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00941}00941 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00942}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a5f40dcf39c41a44b5209b5d1f1c38f05}{00942}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a5f40dcf39c41a44b5209b5d1f1c38f05}{cbegin}}() const\& noexcept -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4b45a8eae2479be3d78c91a6c40b0b3b}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00943}00943 \textcolor{keywordflow}{if} (not empty()) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00944}00944 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(to\_key(\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}()))) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00945}00945 \textcolor{keywordflow}{return} \{\textcolor{keyword}{this}, \mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}()\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00946}00946 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00947}00947 \textcolor{keywordflow}{return} ++\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4b45a8eae2479be3d78c91a6c40b0b3b}{const\_iterator}}\{\textcolor{keyword}{this}, \mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}()\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00948}00948 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00949}00949 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00950}00950 \textcolor{keywordflow}{return} end();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00951}00951 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00952}00952 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00953}00953 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00954}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a1145eb9f9fe06edd892e838e7b557416}{00954}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a1145eb9f9fe06edd892e838e7b557416}{end}}() \& \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00955}00955 \textcolor{keywordflow}{return} \{\textcolor{keyword}{this}, \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}()\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00956}00956 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00957}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a9b37c6c5bfee9498cbca28add081f5e7}{00957}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a9b37c6c5bfee9498cbca28add081f5e7}{end}}() const\& noexcept -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4b45a8eae2479be3d78c91a6c40b0b3b}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00958}00958 \textcolor{keywordflow}{return} \{\textcolor{keyword}{this}, \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}()\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00959}00959 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00960}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aa4e4a1b367ef76352219e070e7595569}{00960}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aa4e4a1b367ef76352219e070e7595569}{cend}}() const\& noexcept -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4b45a8eae2479be3d78c91a6c40b0b3b}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00961}00961 \textcolor{keywordflow}{return} \{\textcolor{keyword}{this}, \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}()\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00962}00962 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00963}00963 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00964}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a69d0e16882dc059f357a3f0f8665082a}{00964}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a69d0e16882dc059f357a3f0f8665082a}{rbegin}}() \& \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a8a8982b3e38e9968b7d6d4e19a167f25}{reverse\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00965}00965 \textcolor{keywordflow}{return} std::make\_reverse\_iterator(end());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00966}00966 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00967}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a46060101f13f8794d947b660e1d6bc1f}{00967}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a46060101f13f8794d947b660e1d6bc1f}{rbegin}}() const\& noexcept} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00968}00968 -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a66da3b82528846a1d1d2498f194ce0bd}{const\_reverse\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00969}00969 \textcolor{keywordflow}{return} std::make\_reverse\_iterator(end());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00970}00970 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00971}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_afdf251c76f5d0448de68fd24cfda6280}{00971}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_afdf251c76f5d0448de68fd24cfda6280}{crbegin}}() const\& noexcept} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00972}00972 -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a66da3b82528846a1d1d2498f194ce0bd}{const\_reverse\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00973}00973 \textcolor{keywordflow}{return} std::make\_reverse\_iterator(crend());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00974}00974 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00975}00975 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00976}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ad964ce078c3f9470cdbe145df5dd73a4}{00976}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ad964ce078c3f9470cdbe145df5dd73a4}{rend}}() \& \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a8a8982b3e38e9968b7d6d4e19a167f25}{reverse\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00977}00977 \textcolor{keywordflow}{return} std::make\_reverse\_iterator(begin());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00978}00978 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00979}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aa9075dd6c641890ca6afe2349be158ee}{00979}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aa9075dd6c641890ca6afe2349be158ee}{rend}}() const\& noexcept} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00980}00980 -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a66da3b82528846a1d1d2498f194ce0bd}{const\_reverse\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00981}00981 \textcolor{keywordflow}{return} std::make\_reverse\_iterator(begin());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00982}00982 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00983}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a7a175b18b28feb05b1c6219606e25935}{00983}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a7a175b18b28feb05b1c6219606e25935}{crend}}() const\& noexcept} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00984}00984 -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a66da3b82528846a1d1d2498f194ce0bd}{const\_reverse\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00985}00985 \textcolor{keywordflow}{return} std::make\_reverse\_iterator(cbegin());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00986}00986 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00987}00987 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00988}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ad354811d5af35246b76bbd3fba28fad3}{00988}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ad354811d5af35246b76bbd3fba28fad3}{empty}}() const\& noexcept -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00989}00989 \textcolor{keywordflow}{return} \_size == 0;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00990}00990 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00991}00991 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00992}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a27a5c8697986a78100c4b6207ac469fa}{00992}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a27a5c8697986a78100c4b6207ac469fa}{size}}() const\& noexcept -\/> \mbox{\hyperlink{namespacestd}{std}}::\textcolor{keywordtype}{size\_t} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00993}00993 \textcolor{keywordflow}{return} \_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00994}00994 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00995}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a32823ce4d3cbe172ae3dfeaa3ddd7863}{00995}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a32823ce4d3cbe172ae3dfeaa3ddd7863}{ssize}}() const\& noexcept -\/> \mbox{\hyperlink{namespacestd}{std}}::ptrdiff\_t \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00996}00996 \textcolor{keywordflow}{return} \_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00997}00997 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00998}00998 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l00999}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ab4733c5df260a4ae6dbe26f234361adc}{00999}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{static} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ab4733c5df260a4ae6dbe26f234361adc}{max\_size}}() noexcept -\/> \mbox{\hyperlink{namespacestd}{std}}::\textcolor{keywordtype}{size\_t} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01000}01000 \textcolor{keywordflow}{return} key\_range;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01001}01001 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01002}01002 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01003}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a58a741516e8d27d584066f43aebd88ab}{01003}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a58a741516e8d27d584066f43aebd88ab}{clear}}() noexcept -\/> \textcolor{keywordtype}{void} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01004}01004 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} i : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(+\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}() + 1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01005}01005 \textcolor{keyword}{auto} j = \textcolor{keyword}{static\_cast<}Key\textcolor{keyword}{>}(i);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01006}01006 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(j)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01007}01007 unsafe\_at(j).destroy();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01008}01008 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01009}01009 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01010}01010 \_size = 0;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01011}01011 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01012}01012 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01013}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a3eb0cf458cfb953695ed7b1b70bb7866}{01013}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a3eb0cf458cfb953695ed7b1b70bb7866}{insert}}(\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aee8a9dfd2ae9d26b817ffbb73874d3d9}{value\_type}}\& value) -\/> std::pair \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01014}01014 \textcolor{keywordflow}{if} (not \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(value.first)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01015}01015 construct(value.first, value.second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01016}01016 \textcolor{keywordflow}{return} \{\{\textcolor{keyword}{this}, index(value.first)\}, \textcolor{keyword}{true}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01017}01017 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01018}01018 \textcolor{keywordflow}{return} \{\{\textcolor{keyword}{this}, index(value.first)\}, \textcolor{keyword}{false}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01019}01019 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01020}01020 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01021}01021 \textcolor{keyword}{template} <\textcolor{keyword}{typename} U>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01022}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a38c2421bde3ab62df11d9e404f375d36}{01022}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a38c2421bde3ab62df11d9e404f375d36}{insert}}(U\&\& value)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01023}01023 -\/> \mbox{\hyperlink{namespacekblib_acdb4473ef9196a18a0e37e05171729f0}{return\_assert\_t::value}},} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01024}01024 std::pair> \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01025}01025 \textcolor{keywordflow}{if} (not \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(value.first)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01026}01026 construct(value.first, std::forward(value.second));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01027}01027 \textcolor{keywordflow}{return} \{\{\textcolor{keyword}{this}, index(value.first)\}, \textcolor{keyword}{true}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01028}01028 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01029}01029 \textcolor{keywordflow}{return} \{\{\textcolor{keyword}{this}, index(value.first)\}, \textcolor{keyword}{false}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01030}01030 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01031}01031 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01032}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_acfabf203a00d8345f11c970c77d24cdc}{01032}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_acfabf203a00d8345f11c970c77d24cdc}{insert}}(\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aee8a9dfd2ae9d26b817ffbb73874d3d9}{value\_type}}\&\& value) -\/> std::pair \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01033}01033 \textcolor{keywordflow}{if} (not \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(value.first)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01034}01034 construct(value.first, std::move(value.second));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01035}01035 \textcolor{keywordflow}{return} \{\{\textcolor{keyword}{this}, index(value.first)\}, \textcolor{keyword}{true}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01036}01036 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01037}01037 \textcolor{keywordflow}{return} \{\{\textcolor{keyword}{this}, index(value.first)\}, \textcolor{keyword}{false}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01038}01038 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01039}01039 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01040}01040 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01041}01041 \textcolor{keyword}{template} <\textcolor{keyword}{typename} U>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01042}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a35a6585499b24bddeb9b9932eb14ad7a}{01042}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a35a6585499b24bddeb9b9932eb14ad7a}{insert\_or\_assign}}(Key key, U\&\& value)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01043}01043 -\/> std::pair \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01044}01044 \textcolor{keywordflow}{if} (not \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01045}01045 construct(key, std::forward(value));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01046}01046 \textcolor{keywordflow}{return} \{\{\textcolor{keyword}{this}, index(key)\}, \textcolor{keyword}{true}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01047}01047 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01048}01048 *unsafe\_at(key).get() = std::forward(value);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01049}01049 \textcolor{keywordflow}{return} \{\{\textcolor{keyword}{this}, index(key)\}, \textcolor{keyword}{false}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01050}01050 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01051}01051 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01052}01052 \textcolor{keyword}{template} <\textcolor{keyword}{typename}... Args>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01053}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_afdc98927e386b7451bf944b82602094f}{01053}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_afdc98927e386b7451bf944b82602094f}{try\_emplace}}(Key key, Args\&\&... args)} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01054}01054 -\/> std::pair \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01055}01055 \textcolor{keywordflow}{if} (not \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01056}01056 construct(key, std::forward(args)...);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01057}01057 \textcolor{keywordflow}{return} \{\{\textcolor{keyword}{this}, index(key)\}, \textcolor{keyword}{true}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01058}01058 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01059}01059 \textcolor{keywordflow}{return} \{\{\textcolor{keyword}{this}, index(key)\}, \textcolor{keyword}{false}\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01060}01060 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01061}01061 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01062}01062 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01063}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4e80f1e4db3a01a1e6abbb6a43f360f7}{01063}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4e80f1e4db3a01a1e6abbb6a43f360f7}{erase}}(\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}} pos) \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01064}01064 assert(\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(to\_key(pos.pos)));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01065}01065 destroy(to\_key(pos.pos));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01066}01066 \textcolor{keywordflow}{return} ++pos;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01067}01067 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01068}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_adab2c179ad6be9b762298efde1d35807}{01068}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_adab2c179ad6be9b762298efde1d35807}{erase}}(\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4b45a8eae2479be3d78c91a6c40b0b3b}{const\_iterator}} pos) \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01069}01069 assert(\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(to\_key(pos.pos)));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01070}01070 destroy(to\_key(pos.pos));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01071}01071 \textcolor{keywordflow}{return} ++pos;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01072}01072 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01073}01073 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01074}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a11bc9c50048d11119f4d4357f37756d2}{01074}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a11bc9c50048d11119f4d4357f37756d2}{erase}}(\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}} first, \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}} last) \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01075}01075 \textcolor{keywordflow}{for} (\textcolor{keyword}{auto} i : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(first.pos, last.pos)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01076}01076 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(to\_key(i))) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01077}01077 destroy(to\_key(i));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01078}01078 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01079}01079 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01080}01080 \textcolor{keywordflow}{return} ++last;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01081}01081 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01082}01082 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01083}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a8f9be631a64dfa66f86069ac8c6f89f4}{01083}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a8f9be631a64dfa66f86069ac8c6f89f4}{erase}}(Key key) \textcolor{keyword}{noexcept} -\/> std::size\_t \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01084}01084 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01085}01085 destroy(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01086}01086 \textcolor{keywordflow}{return} 1;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01087}01087 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01088}01088 \textcolor{keywordflow}{return} 0;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01089}01089 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01090}01090 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01091}01091 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01092}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aa222e28c04cb200616c92ee48491bd0c}{01092}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aa222e28c04cb200616c92ee48491bd0c}{swap}}(\mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& other) \textcolor{keyword}{noexcept}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01093}01093 std::is\_nothrow\_move\_constructible::value and} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01094}01094 \mbox{\hyperlink{structkblib_1_1fakestd_1_1is__nothrow__swappable}{fakestd::is\_nothrow\_swappable::value}}) -\/> \textcolor{keywordtype}{void} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01095}01095 \textcolor{keyword}{using }\mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{std::swap}};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01096}01096 \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a10eca596bac66992a3222416a9b19004}{key\_type}} \mbox{\hyperlink{structk}{k}} : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{range}}(+\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}() + 1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01097}01097 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(\mbox{\hyperlink{structk}{k}})) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01098}01098 \textcolor{keywordflow}{if} (other.contains(\mbox{\hyperlink{structk}{k}})) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01099}01099 \mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{kblib::swap}}(unsafe\_at(\mbox{\hyperlink{structk}{k}}).\mbox{\hyperlink{namespacekblib_a951945f1ed7d42562a7e6fa8cf8f0405}{get}}()-\/>second,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01100}01100 other.unsafe\_at(\mbox{\hyperlink{structk}{k}}).get()-\/>second);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01101}01101 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01102}01102 other.construct(\mbox{\hyperlink{structk}{k}}, std::move(unsafe\_at(\mbox{\hyperlink{structk}{k}}).\mbox{\hyperlink{namespacekblib_a951945f1ed7d42562a7e6fa8cf8f0405}{get}}()-\/>second));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01103}01103 destroy(\mbox{\hyperlink{structk}{k}});} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01104}01104 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01105}01105 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (other.contains(\mbox{\hyperlink{structk}{k}})) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01106}01106 construct(\mbox{\hyperlink{structk}{k}}, std::move(other.unsafe\_at(\mbox{\hyperlink{structk}{k}}).get()-\/>second));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01107}01107 other.destroy(\mbox{\hyperlink{structk}{k}});} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01108}01108 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01109}01109 \textcolor{comment}{// do nothing}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01110}01110 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01111}01111 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01112}01112 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01113}01113 \mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{swap}}(active\_elems, other.active\_elems);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01114}01114 \mbox{\hyperlink{namespacekblib_a4aadfdece3872e99551aa812ac3bac27}{swap}}(\_size, other.\_size);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01115}01115 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01116}01116 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01117}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a275756311c4f9e9701de30156dd5ffef}{01117}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a275756311c4f9e9701de30156dd5ffef}{contains}}(Key key) \textcolor{keyword}{const} \textcolor{keyword}{noexcept} -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01118}01118 \textcolor{keywordflow}{return} bitmap().test(uindex(key));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01119}01119 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01120}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a06d56c245f2f2474a349b29884f298f5}{01120}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a06d56c245f2f2474a349b29884f298f5}{count}}(Key key) \textcolor{keyword}{const} \textcolor{keyword}{noexcept} -\/> std::size\_t \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01121}01121 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01122}01122 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01123}01123 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01124}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a54cf56cc41c70bfb770d5dd3be9302bd}{01124}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a54cf56cc41c70bfb770d5dd3be9302bd}{find}}(Key key) \& \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01125}01125 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key) ? \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}}\{\textcolor{keyword}{this}, index(key)\} : end();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01126}01126 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01127}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a567945ea17bb54f93ce97e8697d035f8}{01127}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a567945ea17bb54f93ce97e8697d035f8}{find}}(Key key) \textcolor{keyword}{const}\& \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01128}01128 -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4b45a8eae2479be3d78c91a6c40b0b3b}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01129}01129 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key) ? \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}}\{\textcolor{keyword}{this}, index(key)\} : end();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01130}01130 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01131}01131 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01132}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a08806ade071f3141a31475c3787b3ed6}{01132}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a08806ade071f3141a31475c3787b3ed6}{equal\_range}}(Key key) \& \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01133}01133 -\/> std::pair \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01134}01134 \textcolor{keywordflow}{return} \{lower\_bound(key), upper\_bound(key)\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01135}01135 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01136}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_afd33533a1e36a6745bc50fe9ef9477b1}{01136}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_afd33533a1e36a6745bc50fe9ef9477b1}{equal\_range}}(Key key) \textcolor{keyword}{const}\& \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01137}01137 -\/> std::pair \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01138}01138 \textcolor{keywordflow}{return} \{lower\_bound(key), upper\_bound(key)\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01139}01139 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01140}01140 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01141}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ad586c3c499c956554393c9230d8e34a5}{01141}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ad586c3c499c956554393c9230d8e34a5}{lower\_bound}}(Key key) \& \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01142}01142 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01143}01143 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_abc7f2ec97efdee8640fe38e73fe1fdad}{find}}(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01144}01144 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01145}01145 \textcolor{keywordflow}{return} ++\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}}\{\textcolor{keyword}{this}, index(key)\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01146}01146 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01147}01147 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01148}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ab92d8673768b59d7258a78841dcf756f}{01148}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ab92d8673768b59d7258a78841dcf756f}{lower\_bound}}(Key key) \textcolor{keyword}{const}\& \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01149}01149 -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4b45a8eae2479be3d78c91a6c40b0b3b}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01150}01150 \textcolor{keywordflow}{if} (\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01151}01151 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_abc7f2ec97efdee8640fe38e73fe1fdad}{find}}(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01152}01152 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01153}01153 \textcolor{keywordflow}{return} ++\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}}\{\textcolor{keyword}{this}, index(key)\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01154}01154 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01155}01155 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01156}01156 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01157}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a394b809f42bf0ed20a471960e4a6884a}{01157}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a394b809f42bf0ed20a471960e4a6884a}{upper\_bound}}(Key key) \& \textcolor{keyword}{noexcept} -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a51696443280a7f62b66a6fabc04429b2}{iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01158}01158 \textcolor{comment}{// if the key exists, upper\_bound is the next one}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01159}01159 \textcolor{keyword}{auto} l = lower\_bound(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01160}01160 \textcolor{keywordflow}{if} (l.pos == index(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01161}01161 \textcolor{keywordflow}{return} ++l;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01162}01162 \textcolor{comment}{// otherwise upper\_bound == lower\_bound}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01163}01163 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01164}01164 \textcolor{keywordflow}{return} l;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01165}01165 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01166}01166 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01167}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4c17830aa70933fad4859b271a95cd94}{01167}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4c17830aa70933fad4859b271a95cd94}{upper\_bound}}(Key key) \textcolor{keyword}{const}\& \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01168}01168 -\/> \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4b45a8eae2479be3d78c91a6c40b0b3b}{const\_iterator}} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01169}01169 \textcolor{comment}{// if the key exists, upper\_bound is the next one}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01170}01170 \textcolor{keyword}{auto} l = lower\_bound(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01171}01171 \textcolor{keywordflow}{if} (l.pos == index(key)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01172}01172 \textcolor{keywordflow}{return} ++l;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01173}01173 \textcolor{comment}{// otherwise upper\_bound == lower\_bound}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01174}01174 \} \textcolor{keywordflow}{else} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01175}01175 \textcolor{keywordflow}{return} l;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01176}01176 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01177}01177 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01178}01178 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01179}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a3a9a4637815c1cc7cc058c0a201e6983}{01179}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{static} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a3a9a4637815c1cc7cc058c0a201e6983}{min}}() noexcept -\/> Key \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01180}01180 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{std::numeric\_limits::min}}();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01181}01181 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01182}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a26a24ce811b6cfcf014b808c47c289db}{01182}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{static} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a26a24ce811b6cfcf014b808c47c289db}{max}}() noexcept -\/> Key \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01183}01183 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{std::numeric\_limits::max}}();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01184}01184 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01185}01185 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01186}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4e692acc310450aef87b1551b0b8b5cc}{01186}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a4e692acc310450aef87b1551b0b8b5cc}{operator==}}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01187}01187 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& l,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01188}01188 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& r) \textcolor{keyword}{noexcept}(\textcolor{keyword}{noexcept}(std::declval()} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01189}01189 == std::declval())) -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01190}01190 \textcolor{keywordflow}{if} (l.size() != r.size()) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01191}01191 \textcolor{keywordflow}{return} \textcolor{keyword}{false};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01192}01192 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01193}01193 \textcolor{keywordflow}{for} (\textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a10eca596bac66992a3222416a9b19004}{key\_type}} i : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{kblib::range}}(+\mbox{\hyperlink{namespacekblib_1_1nums_a24555c4b07301e176bf192adf4e80499}{min}}(), \mbox{\hyperlink{namespacekblib_1_1nums_a64067ecc4167ce1cfe32860ef5c1dc47}{max}}() + 1)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01194}01194 \textcolor{keywordflow}{if} (l.contains(i) != r.contains(i)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01195}01195 \textcolor{keywordflow}{return} \textcolor{keyword}{false};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01196}01196 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (l.contains(i)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01197}01197 \textcolor{keywordflow}{if} (l.at(i) != r.at(i)) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01198}01198 \textcolor{keywordflow}{return} \textcolor{keyword}{false};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01199}01199 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01200}01200 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01201}01201 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01202}01202 \textcolor{keywordflow}{return} \textcolor{keyword}{true};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01203}01203 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01204}01204 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01205}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_add43d0a97298a03e566be7c51a6ad052}{01205}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_add43d0a97298a03e566be7c51a6ad052}{operator!=}}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01206}01206 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& l,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01207}01207 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& r) \textcolor{keyword}{noexcept}(\textcolor{keyword}{noexcept}(std::declval()} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01208}01208 == std::declval())) -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01209}01209 \textcolor{keywordflow}{return} not (l == r);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01210}01210 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01211}01211 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01212}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aee634c370a70d838e5960354695838d5}{01212}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_aee634c370a70d838e5960354695838d5}{operator<}}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01213}01213 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& l,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01214}01214 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& r) \textcolor{keyword}{noexcept}(\textcolor{keyword}{noexcept}(std::declval(),} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01215}01215 std::declval())) -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01216}01216 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_aec67bf14d264f3587e3b86645af62d2a}{kblib::lexicographical\_compare}}(l.begin(), l.end(), r.begin(),} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01217}01217 r.end());} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01218}01218 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01219}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a993d8f410a720f0989b6415e8e8512a4}{01219}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a993d8f410a720f0989b6415e8e8512a4}{operator>}}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01220}01220 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& l,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01221}01221 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& r) \textcolor{keyword}{noexcept}(\textcolor{keyword}{noexcept}(std::declval(),} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01222}01222 std::declval())) -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01223}01223 \textcolor{keywordflow}{return} r < l;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01224}01224 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01225}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ac22602f67fafa4a1375cf22f4f814ee3}{01225}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ac22602f67fafa4a1375cf22f4f814ee3}{operator<=}}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01226}01226 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& l,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01227}01227 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& r) \textcolor{keyword}{noexcept}(\textcolor{keyword}{noexcept}(std::declval(),} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01228}01228 std::declval())) -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01229}01229 \textcolor{keywordflow}{return} not (r < l);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01230}01230 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01231}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a63a63b7d1b078792f5ac3d2a406305cd}{01231}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{friend} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a63a63b7d1b078792f5ac3d2a406305cd}{operator>=}}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01232}01232 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& l,} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01233}01233 \textcolor{keyword}{const} \mbox{\hyperlink{classkblib_1_1direct__map}{direct\_map}}\& r) \textcolor{keyword}{noexcept}(\textcolor{keyword}{noexcept}(std::declval(),} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01234}01234 std::declval())) -\/> \textcolor{keywordtype}{bool} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01235}01235 \textcolor{keywordflow}{return} not (l < r);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01236}01236 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01237}01237 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01238}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a408fa420d8e0dade4ab715631a8d3096}{01238}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{static} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_a408fa420d8e0dade4ab715631a8d3096}{index}}(Key key) \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01239}01239 -\/> std::ptrdiff\_t \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01240}01240 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_a1909a64960663825ccc4eb98e4637df2}{to\_signed}}(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01241}01241 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01242}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ac46a24c8c2970b29edc42fdfe8ea3209}{01242}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{static} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_ac46a24c8c2970b29edc42fdfe8ea3209}{uindex}}(Key key) \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01243}01243 -\/> std::size\_t \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01244}01244 \textcolor{keywordflow}{return} \mbox{\hyperlink{namespacekblib_af9e250fffa2922e623baa08aa8994f54}{to\_unsigned}}(key);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01245}01245 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01246}\mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_af1de45aad9e8a49549001dd5f78f57b9}{01246}} \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{static} \textcolor{keyword}{auto} \mbox{\hyperlink{classkblib_1_1direct__map_3_01_key_00_01_t_00_01void_01_4_af1de45aad9e8a49549001dd5f78f57b9}{to\_key}}(std::ptrdiff\_t i) \textcolor{keyword}{noexcept}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01247}01247 -\/> Key \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01248}01248 \textcolor{keywordflow}{return} Key(i);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01249}01249 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01250}01250 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01251}01251 \textcolor{keyword}{private}:} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01252}01252 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} bitmap() noexcept -\/> \mbox{\hyperlink{namespacestd}{std}}::bitset\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01253}01253 \textcolor{keywordflow}{return} active\_elems;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01254}01254 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01255}01255 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} bitmap() const noexcept} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01256}01256 -\/> const \mbox{\hyperlink{namespacestd}{std}}::bitset\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01257}01257 \textcolor{keywordflow}{return} active\_elems;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01258}01258 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01259}01259 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01260}01260 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} unsafe\_at(Key key) \& -\/> storage\_type\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01261}01261 \textcolor{keywordflow}{return} elems[uindex(key)];} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01262}01262 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01263}01263 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} unsafe\_at(Key key) \&\& -\/> storage\_type\&\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01264}01264 \textcolor{keywordflow}{return} elems[uindex(key)];} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01265}01265 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01266}01266 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} unsafe\_at(Key key) \textcolor{keyword}{const}\& -\/> \textcolor{keyword}{const}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01267}01267 storage\_type\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01268}01268 \textcolor{keywordflow}{return} elems[uindex(key)];} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01269}01269 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01270}01270 \mbox{\hyperlink{tdecl_8h_a7f62d0731631a0e7675f45924b7f5ea0}{KBLIB\_NODISCARD}} \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} unsafe\_at(Key key) \textcolor{keyword}{const}\&\& -\/> \textcolor{keyword}{const}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01271}01271 storage\_type\&\& \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01272}01272 \textcolor{keywordflow}{return} elems[uindex(key)];} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01273}01273 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01274}01274 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01275}01275 \textcolor{keyword}{template} <\textcolor{keyword}{typename}... Args>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01276}01276 \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} construct(Key key, Args\&\&... args) \textcolor{keyword}{noexcept}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01277}01277 std::is\_nothrow\_constructible::value) -\/> \textcolor{keywordtype}{void} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01278}01278 \textcolor{keywordflow}{if} (not active\_elems.test(uindex(key))) \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01279}01279 do\_construct(key, std::forward(args)...);} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01280}01280 \textcolor{comment}{// doing these after construction maintains exception safety.}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01281}01281 active\_elems.set(uindex(key));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01282}01282 ++\_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01283}01283 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01284}01284 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01285}01285 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01286}01286 \textcolor{keyword}{template} <\textcolor{keyword}{typename}... Args>} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01287}01287 \textcolor{keyword}{constexpr} \textcolor{keyword}{auto} do\_construct(Key key, Args\&\&... args) \textcolor{keyword}{noexcept}(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01288}01288 std::is\_nothrow\_constructible::value) -\/> \textcolor{keywordtype}{void} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01289}01289 elems[uindex(key)].construct(} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01290}01290 std::piecewise\_construct, std::forward\_as\_tuple(key),} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01291}01291 std::forward\_as\_tuple(std::forward(args)...));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01292}01292 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01293}01293 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01294}01294 \textcolor{keyword}{auto} destroy(Key key) -\/> \textcolor{keywordtype}{void} \{} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01295}01295 assert(\mbox{\hyperlink{namespacekblib_a049d0a38a218a1d7cf786ea8f01f2073}{contains}}(key));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01296}01296 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01297}01297 bitmap().reset(uindex(key));} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01298}01298 unsafe\_at(key).destroy();} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01299}01299 -\/-\/\_size;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01300}01300 \}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01301}01301 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01302}01302 \textcolor{comment}{// TODO(killerbee13): Implement, test, and document direct\_map}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01303}01303 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01304}01304 std::bitset active\_elems;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01305}01305 std::array elems;} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01306}01306 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01307}01307 std::size\_t \_size\{\};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01308}01308 \};} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01309}01309 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01310}01310 \} \textcolor{comment}{// namespace KBLIB\_NS}} \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01311}01311 } \DoxyCodeLine{\Hypertarget{direct__map_8h_source_l01312}01312 \textcolor{preprocessor}{\#endif }\textcolor{comment}{// DIRECT\_MAP\_H}} \end{DoxyCode}