From: g0dil Date: Mon, 28 Sep 2009 19:42:27 +0000 (+0000) Subject: Utils: Add senf::copy_range X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=e7448a557d83dae40eb404c21b0e858ee24fad4b;p=senf.git Utils: Add senf::copy_range git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1456 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Utils/Range.cti b/senf/Utils/Range.cti index 38744c3..016b4ad 100644 --- a/senf/Utils/Range.cti +++ b/senf/Utils/Range.cti @@ -52,6 +52,18 @@ senf::make_transform_range(Range & range, Fn const & fn) boost::make_transform_iterator(boost::end(range), fn) ); } +template +prefix_ void senf::copy_range(Range const & range, Iterator const & i) +{ + std::copy(boost::begin(range), boost::end(range), i); +} + +template +prefix_ void senf::copy_range(Range & range, Iterator const & i) +{ + std::copy(boost::begin(range), boost::end(range), i); +} + ///////////////////////////////cti.e/////////////////////////////////////// #undef prefix_ diff --git a/senf/Utils/Range.hh b/senf/Utils/Range.hh index 6f9ef84..9b8462b 100644 --- a/senf/Utils/Range.hh +++ b/senf/Utils/Range.hh @@ -52,6 +52,12 @@ namespace senf { typename boost::range_iterator::type > > make_transform_range(Range & range, Fn const & fn); + template + void copy_range(Range const & range, Iterator const & i); + + template + void copy_range(Range & range, Iterator const & i); + } ///////////////////////////////hh.e////////////////////////////////////////