lundi 20 mai 2019

Is it possible to declare a constexpr pointer instead of a pointer to constexpr?

Is it correct that

constexpr int* p = nullptr;

declares constexpr pointer (instead of a pointer to constexpr int)?

This definition

int* constexpr p = nullptr;

gives a compilation error.

Aucun commentaire:

Enregistrer un commentaire