[GiNaC-list] Getting a pointer to an element in a list?

John Pye john.pye at student.unsw.edu.au
Tue Aug 16 17:25:16 CEST 2005

Hi all

A hopefully pretty simple question about lists in GiNaC. I have a little
fragment of code like this:

class SymbolicSystem{

   GiNaC::lst F;

   const ex * getExpressionPtr(const unsigned &i) const{
      *return* &(F[i]);

Is there something about the implementation of the operator[] in
GiNaC::list that stops me from being able to do this? GCC gives me a
warning, like this:

warning: taking address of temporary

This might be an elementary C++ mistake, but just in case, I thought I'd


More information about the GiNaC-list mailing list