Lines Matching refs:begin
69 // fill the range [begin, end) with copies of value, return nothing.
70 // fill_n the range [begin, begin + n) with copies of value, return
71 // the pointer at begin + n.
74 // begin and end params. Fix this when iterator are defined.
79 template<typename _T> static void fill(_T *begin, const _T *end,
82 for (; begin < end; ++begin)
83 *begin = value;
89 template<typename _T> static void fill(_T *begin, const _T *end,
94 for (; begin < end; ++begin)
95 *begin = tmp;
99 template<typename _T> void fill(_T *begin, _T *end, const _T& value)
102 __fill<is_scalar>::fill(begin, end, value);
106 inline void fill(unsigned char *begin, unsigned char *end,
109 if (begin < end)
112 std::memset(begin, tmp, end - begin);
116 inline void fill(signed char *begin, signed char *end, const signed char& value)
118 if (begin < end)
121 std::memset(begin, tmp, end - begin);
125 inline void fill(char *begin, char *end, const char& value)
127 if (begin < end)
130 std::memset(begin, tmp, end - begin);
136 template<typename _T> static _T *fill_n(_T *begin, size_t num,
139 for (size_t i = 0; i < num; ++i, ++begin)
141 *begin = value;
143 return begin;
149 template<typename _T> static _T *fill_n(_T *begin, size_t num,
154 for (size_t i = 0; i < num; ++i, ++begin)
156 *begin = tmp;
158 return begin;
162 template<typename _T> _T *fill_n(_T *begin, size_t n, const _T& value)
165 return __fill_n<is_scalar>::fill_n(begin, n, value);
170 inline unsigned char *fill_n(unsigned char *begin, size_t num,
174 std::memset(begin, tmp, num);
175 return begin + num;
178 inline signed char *fill_n(signed char *begin, size_t num,
182 std::memset(begin, tmp, num);
183 return begin + num;
186 inline char *fill_n(char *begin, size_t num, const char& value)
189 std::memset(begin, tmp, num);
190 return begin + num;