dimanche 1 septembre 2019

Why a non-const r-value reference binds to an integer literal? [on hold]

const int&& cr = 0;

OK

int&& r = 0;
++r;

But this code looks weird. Why is it allowed?

Aucun commentaire:

Enregistrer un commentaire