Understanding the scope of a typedef in two structs (functors)
<p>If I <code>typedef</code> some type within a struct (functor), is the scope of the <code>typedef</code> local to the struct? </p>

<p>Consider the following example where I have typdef'ed foo to be an <code>int</code> and a <code>double</code> in the two separate functors. Is this example correct? </p>

<pre><code>template &lt;typename T&gt; 
struct firstfunctor 
{ 
  typedef int foo; 

  foo operator()(const foo&amp; a, const foo&amp; b) 
  { 
    return /*whatever*/
  } 
}; 

template &lt;typename T&gt; 
struct secondfunctor 
{ 
  typedef double foo; 

  foo operator()(const foo&amp; a, const foo&amp; b) 
  { 
    return /*whatever*/
  } 
}; 
</code></pre>
