On Mon, Jan 30, 2012 at 6:54 AM, m...@apollinemike.com <m...@apollinemike.com> wrote: > Hey all, > > I'm doing some work on the stencil class and I have a programming question. > > I'm experimenting with the following code: > > class Stencil > { > Box dim_; > SCM expr_; > Drul_array<Stencil> children_;
> ../flower/include/drul-array.hh: In instantiation of 'Drul_array<Stencil>': > ./include/stencil.hh:63: instantiated from here > ../flower/include/drul-array.hh:32: error: 'Drul_array<T>::array_' has > incomplete type > ./include/stencil.hh:60: error: forward declaration of 'class Stencil' > make: *** [out/articulations.o] Error 1 > > When I change the Drul_array to a vector, this problem goes away. I would, > however, like it to be a Drul_array (or even better, a pair, but pair gives > me the same forward declaration error as Drul_array). Does anyone know a way > to declare this thing correctly so that I don't get the forward declaration > error? It's not possible. A vector<X> internally creates a pointer to X, which is why it doesn't need to know about X, but drul_array doesn't work like that. Just include stencil.hh and be done with it. -- Han-Wen Nienhuys - han...@xs4all.nl - http://www.xs4all.nl/~hanwen _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel