jeudi 23 juin 2022

what is the purpose of the [] that follow after auto keyword? [duplicate]

Hi I came across this example

 auto [ptr, ec] { std::from_chars(str.data(), str.data() + str.size(), result) };

Can someone please explain the what is the syntax autp [ptr,ec] {} , this is something I am seeing for the first time. Is this new in C++ ?

Any link to the documentation will be very much appreciated.

Thanks

Aucun commentaire:

Enregistrer un commentaire