Ich habe eine Klasse etwas wie folgt aus:Konstruktor für ein No-Namen struct
template <class T>
class bag
{
public:
private:
typedef struct{void* prev; struct{T item; unsigned int count;} body; void* next;}* node;
typedef struct{
node operator->() { return current; }
operator(){;} // <- i can not do that, right?
private:
node current;
} iterator;
//...
};
So, wie ein Konstruktor für die Tasche :: Iterator zu schreiben?
Eine "no-named" -Struktur wird anonyme genannt. –
@Peter G .: nicht anonym, dies ist eine "unbenannte Klasse definiert in einer typedef-Deklaration" '7.1.3/5' – Cubbi
Danke Cubbi, ich stehe korrigiert. –