Skip to content

Should the Array::operator[] throw? #3495

@steffenhk

Description

@steffenhk

Array::operator[] uses poco_assert which throws an exception if the index is out of range.
Is that intentional?
The documentation comment does not indicate that it will throw and there is already an at() method that throws when the index is out of range.
https://github.com/pocoproject/poco/blob/master/Foundation/include/Poco/Array.h#L95

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions