添加fill和fill_n算法
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef _UNINITIALIZED_FUNCTIONS_H_
|
||||
#define _UNINITIALIZED_FUNCTIONS_H_
|
||||
|
||||
#include "Algorithm.h"
|
||||
#include "Construct.h"
|
||||
#include "Iterator.h"
|
||||
#include "TypeTraits.h"
|
||||
@@ -52,9 +53,7 @@ namespace TinySTL{
|
||||
template<class ForwardIterator, class T>
|
||||
void _uninitialized_fill_aux(ForwardIterator first, ForwardIterator last,
|
||||
const T& value, _true_type){
|
||||
//TODO
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD>fill<6C><6C><EFBFBD><EFBFBD>
|
||||
std::fill(first, last, value);
|
||||
fill(first, last, value);
|
||||
}
|
||||
template<class ForwardIterator, class T>
|
||||
void _uninitialized_fill_aux(ForwardIterator first, ForwardIterator last,
|
||||
@@ -82,9 +81,7 @@ namespace TinySTL{
|
||||
template<class ForwardIterator, class Size, class T>
|
||||
ForwardIterator _uninitialized_n_fill_aux(ForwardIterator first,
|
||||
Size n, const T& x, _true_type){
|
||||
//TODO
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD>fill_n<5F><6E><EFBFBD><EFBFBD>
|
||||
return std::fill_n(first, n, x);
|
||||
return fill_n(first, n, x);
|
||||
}
|
||||
template<class ForwardIterator, class Size, class T>
|
||||
ForwardIterator _uninitialized_n_fill_aux(ForwardIterator first,
|
||||
|
||||
Reference in New Issue
Block a user