title: Using sizeof on a typedef instead of a local variable
body: <p>Like in this example (in C):</p>
  
  <pre><code>typedef int type;
  
  int main()
  {
      char type;
      printf("sizeof(type) == %zu\n", sizeof(type)); // Outputs 1
  }
  </code></pre>
  
  <p>The output is always the size of the local variable <code>type</code>.</p>
  
  <p>When C++ removed the need to write <code>struct</code> before each use of a structure it still preserved the <code>struct {type}</code> syntax and introduced an alias (<code>class {type}</code>) to explicitly refer to a structure or class.</p>
  
  <p>Example (in C++):</p>
  
  <pre><code>struct type {
      int m;
  };
  
  int main()
  {
      char type;
      printf("sizeof(type) == %u\n", sizeof(type)); // Outputs 1
      printf("sizeof(struct type) == %u\n", sizeof(struct type)); // Outputs 4
      printf("sizeof(class type) == %u\n", sizeof(class type)); // Outputs 4
  }
  </code></pre>
  
  <p>My question is if there is a way to explicitly refer to a <code>typedef</code> in C or C++. Something like <code>sizeof(typedef type)</code> perhaps (but that does not work).</p>
  
  <p>I know that it is common practice to use different naming conventions for variables and types to avoid these kinds of situations but I would still like to know if there is a way within the langauge to do this or if there is not. :)</p>