[GiNaC-devel] Mysterious push_front()
Richard B. Kreckel
kreckel at in.terlu.de
Wed Mar 2 23:44:00 CET 2022
Hi Jan,
On 02.03.22 18:55, Jan Rheinländer wrote:
> sometimes GiNaCs templates are a mystery to me. In container.h there is
> the code
>
> template<template<classT, class= std::allocator<T>> classC>
> container<C> & container<C>::prepend(constex & b)
> {
> ensure_if_modifiable();
> this->seq.push_front(b);
> return*this;
> }
>
> but AFAIK the STL does not have any push_front() method. And GiNaC does
> not seem to define it either. How can this work?
>
> Same applies for pop_front() and sort()
>
> voidsort_(std::input_iterator_tag)
> {
> this->seq.sort(ex_is_less());
> }
Well, not every STL container provides every possible method.
But the standard does require the ones you mention for the instantiated
template classes. Check again!
-richy.
--
Richard B. Kreckel
<https://in.terlu.de/~kreckel/>
More information about the GiNaC-devel
mailing list