[C++11] | Déclaration d'un tableau static constexpr
par
, 26/10/2014 à 12h37 (890 Affichages)
L'initialisation d'un tableau static constexpr peut se faire directement dans une classe, cependant sa déclaration doit aussi apparaitre dans l'espace global.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 struct Obj { static constexpr int tab[] = { 1, 2, 3 }; }; constexpr int Obj::tab[];