From 28697ee7a86130002e4697ef81afcaae5daf5986 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Sun, 23 Dec 2012 21:48:18 +0900 Subject: [PATCH] add make_ptr_range overload --- sprout/range/ptr_range.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sprout/range/ptr_range.hpp b/sprout/range/ptr_range.hpp index b034e2df..65e111a4 100644 --- a/sprout/range/ptr_range.hpp +++ b/sprout/range/ptr_range.hpp @@ -6,6 +6,7 @@ #include #include #include +#include HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT namespace sprout { namespace range { @@ -21,6 +22,15 @@ namespace sprout { ); } + template + inline SPROUT_CONSTEXPR sprout::range::range_container > + make_ptr_range(T* first, T* last) { + return sprout::range::range_container >( + sprout::ptr_index_iterator(first), + sprout::ptr_index_iterator(first, NS_SSCRISK_CEL_OR_SPROUT::distance(first, last)) + ); + } + template inline SPROUT_CONSTEXPR sprout::range::range_container > make_ptr_range(T (& arr)[N]) {