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 12345struct Obj { static constexpr int tab[] = { 1, 2, 3 }; }; constexpr int Obj::tab[];
struct Obj { static constexpr int tab[] = { 1, 2, 3 }; }; constexpr int Obj::tab[];