Is begin() == end() for any empty() vector?

Yes, that’s what the standard requires it to be for empty() for any container.

ยง 23.2.1 Table 96 of the C++11 standard says:

 +----------+---------------+----------------------+
 |Expression|  Return Type  | Operational Semantics|
 |----------|---------------|----------------------|
 |a.empty() |Convertible    |a.begin() == a.end()  |
 |          |to bool        |                      |
 |          |               |                      |
 +-------------------------------------------------+

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)