mercredi 22 février 2017

Constexpr vs macros

Where should I prefer using macros and where should I prefer constexpr? Aren't they basically the same?

#define MAX_HEIGHT 720

vs

constexpr unsigned int max_height = 720;

Aucun commentaire:

Enregistrer un commentaire