There is no technical reason to prefer one or the other; they are both declaration specifiers which can occur in any order. long const int is valid, even.
The const qualification is in the type; it is not a direct attribute of foo, so putting the const closer to foo means nothing.
The const qualification is in the type; it is not a direct attribute of foo, so putting the const closer to foo means nothing.