#include <iterator>
#include <numeric>
class Example
{
private:
int id;
public:
Example(int i): id(i){}
};
int main() {
Example e[10];
std::iota(std::begin(e), std::end(e), 0);
return 0;
}
I2luY2x1ZGUgPGl0ZXJhdG9yPgojaW5jbHVkZSA8bnVtZXJpYz4KY2xhc3MgRXhhbXBsZQp7CnByaXZhdGU6CiAgaW50IGlkOwpwdWJsaWM6CiAgRXhhbXBsZShpbnQgaSk6IGlkKGkpe30KfTsKCmludCBtYWluKCkgewogICAgRXhhbXBsZSBlWzEwXTsKICAgIHN0ZDo6aW90YShzdGQ6OmJlZ2luKGUpLCBzdGQ6OmVuZChlKSwgMCk7CiAgICByZXR1cm4gMDsKfSAg
prog.cpp: In function ‘int main()’:
prog.cpp:12:17: error: no matching function for call to ‘Example::Example()’
Example e[10];
^
prog.cpp:8:3: note: candidate: Example::Example(int)
Example(int i): id(i){}
^~~~~~~
prog.cpp:8:3: note: candidate expects 1 argument, 0 provided
prog.cpp:3:7: note: candidate: constexpr Example::Example(const Example&)
class Example
^~~~~~~
prog.cpp:3:7: note: candidate expects 1 argument, 0 provided
prog.cpp:3:7: note: candidate: constexpr Example::Example(Example&&)
prog.cpp:3:7: note: candidate expects 1 argument, 0 provided