title: why does the value_type function return a pointer in SGI STL
body: <p>I have got a problem when learning about the iterator traits of SGI STL.</p>
  
  <p>This is a function that get the type of the iterator.</p>
  
  <pre><code>template &lt;class Iterator&gt;
  inline typename iterator_traits&lt;Iterator&gt;::value_type* value_type(const Iterator&amp;){
      return static_cast&lt;typename iterator_traits&lt;Iterator&gt;::value_type*&gt;(0);
  }
  </code></pre>
  
  <p>And this is a function who calls the <code>value_type</code></p>
  
  <pre><code>template &lt;class ForwardIterator, class T&gt;
  inline void uninitialized_fill(ForwardIterator first, ForwardIterator last, const T&amp; x){
          __uninitialized_fill(first,last,x,value_type(first));
  }
  
  template &lt;class ForwardIterator, class T, class T1&gt;
  inline void __uninitialized_fill(ForwardIterator first, ForwardIterator last, const T&amp; x, T1*){
          typedef typename __type_traits&lt;T1&gt;::is_POD_type is_POD;
          __uninitialized_fill_aux(first, last, x, is_POD());
  }
  </code></pre>
  
  <p>I wonder why the <code>value_type</code>function has to return <code>value_type*</code>instead of <code>value_type</code>, I cannot figure out why. In my opinion, it seems that both solutions will be OK.</p>
  
  <p>Hope that someone can help me, Thank you!</p>