Hi,
from the neuron book draft chapter 13 page 13 I learnt that inherit can be emulated that way.
However, the template I am inheriting has an iterator, is it possible to inherit this iterator too, and how?
thanks a lot,
y
How to inherit an iterator from a base class
Re: How to inherit an iterator from a base class
I tried:eacheon wrote:Hi,
from the neuron book draft chapter 13 page 13 I learnt that inherit can be emulated that way.
However, the template I am inheriting has an iterator, is it possible to inherit this iterator too, and how?
thanks a lot,
y
Code: Select all
iterator all() {
base.all($&1, $&2) {
iterator_statement
}
}
However, nrniv errored and said that "ITERATOR can only be used in a for statement".