Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe/algorithm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25760/adobe/algorithm
Added Files:
copy.hpp
Log Message:
the state of things. We've been working to isolate static_text_t (now called label_t) but it has been slow going because we're trying to wrestle with perfecting the API and what effect that has on other components that were using label_t in a way that isn't in accordance with the new API we're trying to write. As it stands static_disabled_text_m is broken on both platforms, but everything else should be working better.
--- NEW FILE: copy.hpp ---
/*
Copyright 2005-2006 Adobe Systems Incorporated
Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
or a copy at http://opensource.adobe.com/licenses.html)
*/
/*************************************************************************************************/
#ifndef ADOBE_ALGORITHM_COPY_HPP
#define ADOBE_ALGORITHM_COPY_HPP
#include <adobe/config.hpp>
/*************************************************************************************************/
namespace adobe {
#if !defined(ADOBE_NO_DOCUMENTATION)
namespace fn { }
using namespace fn;
namespace fn {
#endif
/*************************************************************************************************/
////////////////////////////////////////////////////////////////////////////////////////
///
/// \brief copy_n taken from SGI STL.
///
////////////////////////////////////////////////////////////////////////////////////////
namespace detail {
template <class InputIter, class Size, class OutputIter>
std::pair<InputIter, OutputIter> _copy_n(InputIter first, Size count,
OutputIter result,
std::input_iterator_tag)
{
for ( ; count > 0; --count) {
*result = *first;
++first;
++result;
}
return std::pair<InputIter, OutputIter>(first, result);
}
template <class RAIter, class Size, class OutputIter>
inline std::pair<RAIter, OutputIter>
_copy_n(RAIter first, Size count, OutputIter result, std::random_access_iterator_tag)
{
RAIter last = first + count;
return std::pair<RAIter, OutputIter>(last, std::copy(first, last, result));
}
template <class InputIter, class Size, class OutputIter>
inline std::pair<InputIter, OutputIter>
_copy_n(InputIter first, Size count, OutputIter result)
{
return _copy_n(first, count, result, typename std::iterator_traits<InputIter>::iterator_category());
}
}
template <class InputIter, class Size, class OutputIter>
inline std::pair<InputIter, OutputIter>
copy_n(InputIter first, Size count, OutputIter result)
{
return detail::_copy_n(first, count, result);
}
/*************************************************************************************************/
#if !defined(ADOBE_NO_DOCUMENTATION)
} // namespace fn
#endif
} // namespace adobe
/*************************************************************************************************/
#endif
// ADOBE_ALGORITHM_COPY_HPP
|