Project

General

Profile

Bug #2360

cet::map_vector methods front and back

Added by Rob Kutschke about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Infrastructure
Target version:
Start date:
01/08/2012
Due date:
% Done:

100%

Estimated time:
Occurs In:
Scope:
Internal
Experiment:
-
SSI Package:
Duration:

Description

In cet::map_vector, the following methods are defined:

value_type  front( ) const;
value_type back ( ) const;

I think that they should return by const reference:

value_type const& front() const;
value_type const& back() const;

For symmetry, we can also consider the non-const versions

value_type& front();
value_type& back();

The existing methods throw if the container is empty. I believe that this behaviour should be retained for both the const and non-const versions.

Can we get this in by the Wednesday release?

History

#1 Updated by Walter E Brown about 8 years ago

  • Category set to Infrastructure
  • Status changed from New to Assigned
  • Assignee set to Walter E Brown
  • Target version set to 1.00.07

Non-const versions of these functions are not now provided. This is by design, as such functions would open the door to violation of the class invariant.

#2 Updated by Walter E Brown about 8 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

#3 Updated by Christopher Green about 8 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF