<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>sometimes GiNaCs templates are a mystery to me. In container.h
      there is the code <br>
    </p>
    <p><span style="font-family:monospace"><span
          style="font-weight:bold;color:#000000;background-color:#ffffff;">template</span><span
          style="color:#000000;background-color:#ffffff;"> <</span><span
style="font-weight:bold;color:#000000;background-color:#ffffff;">template</span><span
          style="color:#000000;background-color:#ffffff;"> <</span><span
style="font-weight:bold;color:#000000;background-color:#ffffff;">class</span><span
          style="color:#000000;background-color:#ffffff;"> T, </span><span
style="font-weight:bold;color:#000000;background-color:#ffffff;">class</span><span
          style="color:#000000;background-color:#ffffff;"> =
          std::allocator<T>> </span><span
          style="font-weight:bold;color:#000000;background-color:#ffffff;">class</span><span
          style="color:#000000;background-color:#ffffff;"> C>
        </span><br>
        container<C> & container<C>::prepend(<span
          style="font-weight:bold;color:#000000;background-color:#ffffff;">const</span><span
          style="color:#000000;background-color:#ffffff;"> ex & b)
        </span><br>
        <span style="color:#b218b2;background-color:#ffffff;">{</span><span
          style="color:#000000;background-color:#ffffff;">
        </span><br>
               ensure_if_modifiable();
        <br>
               <span
          style="font-weight:bold;color:#000000;background-color:#ffffff;">this</span><span
          style="color:#000000;background-color:#ffffff;">->seq.push_front(b);
        </span><br>
               <span
          style="font-weight:bold;color:#000000;background-color:#ffffff;">return</span><span
          style="color:#000000;background-color:#ffffff;"> *</span><span
style="font-weight:bold;color:#000000;background-color:#ffffff;">this</span><span
          style="color:#000000;background-color:#ffffff;">;
        </span><br>
        <span style="color:#b218b2;background-color:#ffffff;">}</span><span
          style="color:#000000;background-color:#ffffff;"></span><br>
      </span></p>
    <p>but AFAIK the STL does not have any push_front() method. And
      GiNaC does not seem to define it either. How can this work?</p>
    <p>Same applies for pop_front() and sort()</p>
    <p><span style="font-family:monospace"><span
          style="font-weight:bold;color:#000000;background-color:#ffffff;">void</span><span
          style="color:#000000;background-color:#ffffff;">
          sort_(std::input_iterator_tag)
        </span><br>
               <span style="color:#b218b2;background-color:#ffffff;">{</span><span
          style="color:#000000;background-color:#ffffff;">
        </span><br>
                       <span
          style="font-weight:bold;color:#000000;background-color:#ffffff;">this</span><span
          style="color:#000000;background-color:#ffffff;">->seq.sort(ex_is_less());
        </span><br>
               <span style="color:#b218b2;background-color:#ffffff;">}</span></span></p>
    <p>Jan Rheinländer</p>
    <p><br>
    </p>
    <p><span style="font-family:monospace"><span
          style="color:#b218b2;background-color:#ffffff;"></span></span></p>
  </body>
</html>