diff --git a/include/crap/algorithm.d/adjacentfindvalue.h b/include/crap/algorithm.d/adjacentfindvalue.h index 90c82e1..f667dc4 100644 --- a/include/crap/algorithm.d/adjacentfindvalue.h +++ b/include/crap/algorithm.d/adjacentfindvalue.h @@ -2,6 +2,7 @@ #define CRAP_ALGORITHM_ADJACENTFINDVALUE #include "../utility.d/valuelist.h" +#include "../version.d/libintegralconstantcallable.h" namespace crap { @@ -13,6 +14,9 @@ namespace crap constexpr const static std :: size_t npos = 0u; 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 }; template class Operator, Type Value> struct adjacentFindValue @@ -21,6 +25,9 @@ namespace crap constexpr const static std :: size_t npos = 1u; 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 }; template class Operator, Type ... Values> struct adjacentFindValue @@ -40,6 +47,9 @@ namespace crap constexpr const static std :: size_t npos = (lower :: npos) + (upper :: 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 }; } @@ -49,6 +59,15 @@ template class Operator> { return crap :: adjacentFindValue :: value; } +#if (crap_lib_integral_constant_callable >= 201304L) + +template class Operator> + inline constexpr typename crap :: adjacentFindValue :: value_type + crap :: adjacentFindValue :: operator () () const noexcept +{ + return crap :: adjacentFindValue :: value; +} +#endif template class Operator, Type Value> inline constexpr crap :: adjacentFindValue :: operator @@ -56,6 +75,15 @@ template class Operator, Type Value> { return crap :: adjacentFindValue :: value; } +#if (crap_lib_integral_constant_callable >= 201304L) + +template class Operator, Type Value> + inline constexpr typename crap :: adjacentFindValue :: value_type + crap :: adjacentFindValue :: operator () () const noexcept +{ + return crap :: adjacentFindValue :: value; +} +#endif template class Operator, Type ... Values> inline constexpr crap :: adjacentFindValue :: operator @@ -63,5 +91,14 @@ template class Operator, Type ... Values> { return crap :: adjacentFindValue :: value; } +#if (crap_lib_integral_constant_callable >= 201304L) + +template class Operator, Type ... Values> + inline constexpr typename crap :: adjacentFindValue :: value_type + crap :: adjacentFindValue :: operator () () const noexcept +{ + return crap :: adjacentFindValue :: value; +} +#endif #endif