bug fix
This commit is contained in:
@@ -88,7 +88,7 @@ namespace TinySTL{
|
|||||||
Size n, const T& x, _false_type){
|
Size n, const T& x, _false_type){
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (; i != n; ++i){
|
for (; i != n; ++i){
|
||||||
construct((first + i), x);
|
construct((T*)(first + i), x);
|
||||||
}
|
}
|
||||||
return (first + i);
|
return (first + i);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,16 +15,13 @@ using namespace TinySTL::Profiler;
|
|||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
|
|
||||||
//std::vector<std::string> vec;
|
std::vector<std::string> vec;
|
||||||
//TinySTL::vector<std::string> vec;
|
//TinySTL::vector<std::string> vec;
|
||||||
TinySTL::vector<int> vec;
|
|
||||||
ProfilerInstance::start();
|
ProfilerInstance::start();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (; i != 10000; ++i){
|
for (; i != 100000; ++i){
|
||||||
//vec.push_back(std::string("zouxiaohang"));
|
vec.push_back(std::string("zouxiaohang"));
|
||||||
vec.push_back(i);
|
|
||||||
}
|
}
|
||||||
//for (auto i : vec){ cout << i << endl; }
|
|
||||||
ProfilerInstance::finish();
|
ProfilerInstance::finish();
|
||||||
ProfilerInstance::dumpDuringTime();
|
ProfilerInstance::dumpDuringTime();
|
||||||
system("pause");
|
system("pause");
|
||||||
|
|||||||
Reference in New Issue
Block a user