where is the problem?
Ich bin seit fast einer halben Stunde dabei eine vererbte Klasse mit Template-Parametern zum Laufen zu bekommen, aber ich finde den Fehler nicht ...
Das Problem ist das nbrs
unten nicht erkannt wird (was not declared in this scope), obwohl es in der Basisklasse definiert wird.
template <typename bond_type = int>
class DisorderType
{
public:
std::vector<std::vector<int>> nbrs;
DisorderType(){}
};
template <class PointCloud, typename bond_type>
class SomeRandomConnections : public DisorderType<bond_type>
{
private:
RND rng;
public:
SomeRandomConnections(const PointCloud& cloud) : rng(0,1)
{
// do something with nbrs here
nbrs.resize(10*10);
}
};
Aufgerufen wird das ganze als
Regular2D cloud(10);
SomeRandomConnections<Regular2D,double> disorder(cloud);