bug fix
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user