Clang error: calling a private constructor while none of them were actually called

I made a static function of some class, and made constructor private. Now I want to use the function. Clang++ says "The constructor is private", while g++ compiles normally. The thing is, I don’t know if there are any rules in any Standard which could affect this in any way. Any function can make a… Read More Clang error: calling a private constructor while none of them were actually called

Why move assignment in my class wasn't called?

Consider this code: #include <iostream> #include <vector> #include <initializer_list> using namespace std; struct BigInteger { vector<int> arr; BigInteger() { cout << "default constructor" << endl; this->arr.push_back(0); } BigInteger(initializer_list<int> il) { cout << "initializer_list constructor" << endl; for (const int x : il) { arr.push_back(x); } } BigInteger(const BigInteger& obj) //copy constructor { cout << "copy… Read More Why move assignment in my class wasn't called?