I'm not sure about the syntax,
but "size() = 0" looks wrong (== ?)

don't use .at