Reply to post: Re: Really?

Classy move: C++ 20 wins final approval in ISO technical ballot, formal publication expected by end of year

Anonymous Coward
Trollface

Re: Really?

It wouldn't, because a1 wouldn't compile.

Why do you say that? It works for me.

#include <cstddef>

#include <initializer_list>

class A {

public:

A(std::size_t,std::size_t) {}

A(std::initializer_list<std::size_t>) {}

};

int main() {

A a1{0,1};

A a2(0,1);

}

$ g++ --std=c++2a -Wall a.cpp

$

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon