\doxysection{std\+\_\+extensions.\+hpp}
\hypertarget{std__extensions_8hpp_source}{}\label{std__extensions_8hpp_source}\index{ginkgo/core/base/std\_extensions.hpp@{ginkgo/core/base/std\_extensions.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{//\ SPDX-\/FileCopyrightText:\ 2017\ -\/\ 2025\ The\ Ginkgo\ authors}}
\DoxyCodeLine{00002\ \textcolor{comment}{//}}
\DoxyCodeLine{00003\ \textcolor{comment}{//\ SPDX-\/License-\/Identifier:\ BSD-\/3-\/Clause}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#ifndef\ GKO\_PUBLIC\_CORE\_BASE\_STD\_EXTENSIONS\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_BASE\_STD\_EXTENSIONS\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <exception>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <functional>}}
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ <memory>}}
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ <type\_traits>}}
\DoxyCodeLine{00013\ }
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ "{}ginkgo/core/base/types.hpp"{}}}
\DoxyCodeLine{00015\ }
\DoxyCodeLine{00016\ }
\DoxyCodeLine{00017\ \textcolor{comment}{//\ This\ header\ provides\ implementations\ of\ useful\ utilities\ introduced\ into\ the}}
\DoxyCodeLine{00018\ \textcolor{comment}{//\ C++\ standard\ after\ C++14\ (e.g.\ C++17\ and\ C++20).}}
\DoxyCodeLine{00019\ \textcolor{comment}{//\ For\ documentation\ about\ these\ utilities\ refer\ to\ the\ newer\ version\ of\ the}}
\DoxyCodeLine{00020\ \textcolor{comment}{//\ standard.}}
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00022\ }
\DoxyCodeLine{00023\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00029\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko_1_1xstd}{xstd}}\ \{}
\DoxyCodeLine{00030\ \textcolor{keyword}{namespace\ }detail\ \{}
\DoxyCodeLine{00031\ }
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00033\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}...\ Ts>}
\DoxyCodeLine{00034\ \textcolor{keyword}{struct\ }make\_void\ \{}
\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keyword}{using\ }type\ =\ void;}
\DoxyCodeLine{00036\ \};}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00038\ }
\DoxyCodeLine{00039\ \}\ \ \textcolor{comment}{//\ namespace\ detail}}
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00041\ }
\DoxyCodeLine{00046\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}...\ Ts>}
\DoxyCodeLine{00047\ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{namespacegko_1_1xstd_a2d53b45325a9d6c46906d80caf180869}{void\_t}}\ =\ \textcolor{keyword}{typename}\ detail::make\_void<Ts...>::type;}
\DoxyCodeLine{00048\ }
\DoxyCodeLine{00049\ }
\DoxyCodeLine{00050\ GKO\_DEPRECATED(\textcolor{stringliteral}{"{}use\ std::uncaught\_exceptions"{}})}
\DoxyCodeLine{00051\ inline\ \textcolor{keywordtype}{bool}\ uncaught\_exception()\ noexcept}
\DoxyCodeLine{00052\ \{}
\DoxyCodeLine{00053\ \ \ \ \ \textcolor{keywordflow}{return}\ std::uncaught\_exceptions()\ >\ 0;}
\DoxyCodeLine{00054\ \}}
\DoxyCodeLine{00055\ }
\DoxyCodeLine{00056\ }
\DoxyCodeLine{00057\ \textcolor{comment}{//\ Kept\ for\ backward\ compatibility.}}
\DoxyCodeLine{00058\ \textcolor{keyword}{template}\ <\textcolor{keywordtype}{bool}\ B,\ \textcolor{keyword}{typename}\ T\ =\ \textcolor{keywordtype}{void}>}
\DoxyCodeLine{00059\ \textcolor{keyword}{using\ }enable\_if\_t\ =\ std::enable\_if\_t<B,\ T>;}
\DoxyCodeLine{00060\ }
\DoxyCodeLine{00061\ }
\DoxyCodeLine{00062\ \textcolor{comment}{//\ Kept\ for\ backward\ compatibility.}}
\DoxyCodeLine{00063\ \textcolor{keyword}{template}\ <\textcolor{keywordtype}{bool}\ B,\ \textcolor{keyword}{typename}\ T,\ \textcolor{keyword}{typename}\ F>}
\DoxyCodeLine{00064\ \textcolor{keyword}{using\ }conditional\_t\ =\ std::conditional\_t<B,\ T,\ F>;}
\DoxyCodeLine{00065\ }
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00067\ \textcolor{comment}{//\ Kept\ for\ backward\ compatibility.}}
\DoxyCodeLine{00068\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00069\ \textcolor{keyword}{using\ }decay\_t\ =\ std::decay\_t<T>;}
\DoxyCodeLine{00070\ }
\DoxyCodeLine{00071\ }
\DoxyCodeLine{00072\ \textcolor{comment}{//\ Kept\ for\ backward\ compatibility.}}
\DoxyCodeLine{00073\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00074\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{bool}\ greater(\textcolor{keyword}{const}\ T\&\&\ lhs,\ \textcolor{keyword}{const}\ T\&\&\ rhs)}
\DoxyCodeLine{00075\ \{}
\DoxyCodeLine{00076\ \ \ \ \ \textcolor{keywordflow}{return}\ std::greater<void>()(lhs,\ rhs);}
\DoxyCodeLine{00077\ \}}
\DoxyCodeLine{00078\ }
\DoxyCodeLine{00079\ }
\DoxyCodeLine{00080\ \textcolor{comment}{//\ Kept\ for\ backward\ compatibility.}}
\DoxyCodeLine{00081\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00082\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{bool}\ greater\_equal(\textcolor{keyword}{const}\ T\&\&\ lhs,\ \textcolor{keyword}{const}\ T\&\&\ rhs)}
\DoxyCodeLine{00083\ \{}
\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keywordflow}{return}\ std::greater\_equal<void>()(lhs,\ rhs);}
\DoxyCodeLine{00085\ \}}
\DoxyCodeLine{00086\ }
\DoxyCodeLine{00087\ }
\DoxyCodeLine{00088\ \textcolor{comment}{//\ Kept\ for\ backward\ compatibility.}}
\DoxyCodeLine{00089\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00090\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{bool}\ less(\textcolor{keyword}{const}\ T\&\&\ lhs,\ \textcolor{keyword}{const}\ T\&\&\ rhs)}
\DoxyCodeLine{00091\ \{}
\DoxyCodeLine{00092\ \ \ \ \ \textcolor{keywordflow}{return}\ std::less<void>()(lhs,\ \doxymbox{\hyperlink{namespacegko_1_1solver_a82d21321745fbd3dc65c276d5838bb8aa83ff9f9e3dd7561d3dd91204cf546b7e}{rhs}});}
\DoxyCodeLine{00093\ \}}
\DoxyCodeLine{00094\ }
\DoxyCodeLine{00095\ }
\DoxyCodeLine{00096\ \textcolor{comment}{//\ Kept\ for\ backward\ compatibility.}}
\DoxyCodeLine{00097\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00098\ \textcolor{keyword}{constexpr}\ \textcolor{keywordtype}{bool}\ less\_equal(\textcolor{keyword}{const}\ T\&\&\ lhs,\ \textcolor{keyword}{const}\ T\&\&\ rhs)}
\DoxyCodeLine{00099\ \{}
\DoxyCodeLine{00100\ \ \ \ \ \textcolor{keywordflow}{return}\ std::less\_equal<void>()(lhs,\ \doxymbox{\hyperlink{namespacegko_1_1solver_a82d21321745fbd3dc65c276d5838bb8aa83ff9f9e3dd7561d3dd91204cf546b7e}{rhs}});}
\DoxyCodeLine{00101\ \}}
\DoxyCodeLine{00102\ }
\DoxyCodeLine{00103\ }
\DoxyCodeLine{00104\ \textcolor{keyword}{template}\ <\textcolor{keyword}{class}...\ Ts>}
\DoxyCodeLine{00105\ \textcolor{keyword}{using\ }conjunction\ =\ std::conjunction<Ts...>;}
\DoxyCodeLine{00106\ }
\DoxyCodeLine{00107\ }
\DoxyCodeLine{00108\ \textcolor{comment}{//\ Provide\ the\ type\_identity\ from\ C++20}}
\DoxyCodeLine{00109\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00110\ \textcolor{keyword}{struct\ }\doxymbox{\hyperlink{structgko_1_1xstd_1_1type__identity}{type\_identity}}\ \{}
\DoxyCodeLine{00111\ \ \ \ \ \textcolor{keyword}{using\ }type\ =\ T;}
\DoxyCodeLine{00112\ \};}
\DoxyCodeLine{00113\ }
\DoxyCodeLine{00114\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00115\ \textcolor{keyword}{using\ }type\_identity\_t\ =\ \textcolor{keyword}{typename}\ type\_identity<T>::type;}
\DoxyCodeLine{00116\ }
\DoxyCodeLine{00117\ }
\DoxyCodeLine{00118\ \}\ \ \textcolor{comment}{//\ namespace\ xstd}}
\DoxyCodeLine{00119\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00120\ }
\DoxyCodeLine{00121\ }
\DoxyCodeLine{00122\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_BASE\_STD\_EXTENSIONS\_HPP\_}}

\end{DoxyCode}
