Overloaded the iterator's -> operator.

This commit is contained in:
beder
2008-07-02 01:32:19 +00:00
parent b4b287c4e9
commit 807045bc14
4 changed files with 18 additions and 17 deletions

View File

@@ -37,6 +37,14 @@ namespace YAML
throw BadDereference();
}
const Node *Node::Iterator::operator -> ()
{
if(type == IT_SEQ)
return &**seqIter;
throw BadDereference();
}
const Node& Node::Iterator::first()
{
if(type == IT_MAP)