C++ overload resolution problem :How to make vector fill constructor overload instead of vector initilizer list construtor?
#include <vector> #include <iostream> using namespace std; int main() { vector<char> v1 = { size_t(0),0 }; vector<char*> v2 = { size_t(0),0 }; cout << v1.size() << endl;// 2 cout << v2.size() << endl;// 0 return 0; } v1 calls initilizer list ,but v2 calls fill constructor . is there a way to make v1 overloads […]