Durrr…

I just spent over an hour struggling to get a set of class templates to even compile properly. It kept complaining that a base class was undefined, so I kept tinkering with the template parameters, thinking that I was using them incorrectly or there was some subtle behaviour that I was failing to account for, since it’s a moderately complex template (multiple levels of derivation, multiple template parameters at each level).

But no. It was simply because I had copied the base class header file for the derived classes and forgot to change the multi-inclusion-preventer #ifdef on one of them, making it completely skip over the definition of one of the intermediate classes. Duh…

Leave a Reply

Your email address will not be published. Required fields are marked *