I'm just trying to learn the rules of the C++ syntax.
From what I've gathered you read variable types backwards, except the keywords are in front of what they apply to. But I'm not sure how backwards, it doesn't seem to always work.
int const * foo // foo is a const pointer to an int?
const int * foo // foo is a pointer to a const int?
const int const * foo // foo is a const pointer to a const int?
static const int ** foo // foo is a pointer to a pointer to a static const int?
Is this possible to do this:
static int thread_local * foo; // foo is a thread_local pointer to a static int?
const int static * thread_local * const * foo;
// foo is a const pointer to a thread_local pointer to a static pointer to a const int
The last one isn't accepted by Visual Studio, but (for the sake of understanding) I'm not sure why..?