diff --git a/include/crap/algorithm.d/findtype.h b/include/crap/algorithm.d/findtype.h index 859fc1d..c5e8aa6 100644 --- a/include/crap/algorithm.d/findtype.h +++ b/include/crap/algorithm.d/findtype.h @@ -1,10 +1,11 @@ #ifndef CRAP_ALGORITHM_FINDTYPE #define CRAP_ALGORITHM_FINDTYPE -#include "findiftype.h" - #include +#include "findiftype.h" +#include "../version.d/libintegralconstantcallable.h" + namespace crap { template class Operator, class ... Types> @@ -17,6 +18,9 @@ namespace crap constexpr const static std :: size_t npos = findIfType :: npos; using value_type = decltype(value); constexpr operator value_type () const noexcept; +#if (crap_lib_integral_constant_callable >= 201304L) + constexpr value_type operator () () const noexcept; +#endif }; } @@ -26,5 +30,14 @@ template class Operator, class ... Types> { return crap :: findType :: value; } +#if (crap_lib_integral_constant_callable >= 201304L) + +template class Operator, class ... Types> + inline constexpr typename crap :: findType :: value_type + crap :: findType :: operator () () const noexcept +{ + return crap :: findType :: value; +} +#endif #endif