title: C/C++ forward declaration in typedef
body: <p>Looking at the OpenCL header file I see:</p>
  
  <pre><code>typedef struct _cl_context * cl_context;
  </code></pre>
  
  <p>I understand that <code>cl_context</code> is a pointer to a forward declared struct <code>_cl_context</code>.</p>
  
  <p>From the perspective of a library designer, what are the advantages to doing this over:</p>
  
  <pre><code>typedef struct _cl_context cl_context;
  </code></pre>
  
  <p>Is it just so the API calls can take <code>cl_context</code> instead of <code>cl_context*</code>? But if so, why not just do:</p>
  
  <pre><code>typedef void *cl_context;
  </code></pre>