diff --git a/include/etl/iterator.h b/include/etl/iterator.h index 031d5c69..292298c4 100644 --- a/include/etl/iterator.h +++ b/include/etl/iterator.h @@ -1920,6 +1920,27 @@ namespace etl { return first.count(); } +#endif + +#if ETL_USING_CPP14 + template + struct is_range: etl::false_type + { + }; + + template + struct is_range())), + decltype(ETL_OR_STD::end(etl::declval()))>>: etl::true_type + { + }; + +#if ETL_USING_CPP17 + template + inline constexpr bool is_range_v = is_range::value; +#endif +#endif + #if ETL_NOT_USING_STL || ETL_CPP17_NOT_SUPPORTED //************************************************************************** /// Returns a pointer to the block of memory containing the elements of the range. @@ -1964,25 +1985,3 @@ namespace etl } #endif - -#if ETL_USING_CPP14 - template - struct is_range: etl::false_type - { - }; - - template - struct is_range())), - decltype(ETL_OR_STD::end(etl::declval()))>>: etl::true_type - { - }; - -#if ETL_USING_CPP17 - template - inline constexpr bool is_range_v = is_range::value; -#endif -#endif -} - -#endif