This commit is contained in:
邹晓航
2014-09-22 19:42:39 +08:00
parent 0c1897ba95
commit 8fc0180e74
2 changed files with 4 additions and 7 deletions

View File

@@ -88,7 +88,7 @@ namespace TinySTL{
Size n, const T& x, _false_type){
int i = 0;
for (; i != n; ++i){
construct((first + i), x);
construct((T*)(first + i), x);
}
return (first + i);
}

View File

@@ -15,16 +15,13 @@ using namespace TinySTL::Profiler;
int main(){
//std::vector<std::string> vec;
std::vector<std::string> vec;
//TinySTL::vector<std::string> vec;
TinySTL::vector<int> vec;
ProfilerInstance::start();
int i = 0;
for (; i != 10000; ++i){
//vec.push_back(std::string("zouxiaohang"));
vec.push_back(i);
for (; i != 100000; ++i){
vec.push_back(std::string("zouxiaohang"));
}
//for (auto i : vec){ cout << i << endl; }
ProfilerInstance::finish();
ProfilerInstance::dumpDuringTime();
system("pause");