New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 615226 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

linked_hash_map::[] doesn't work with non-copy-able value type

Project Member Reported by danzh@chromium.org, May 26 2016

Issue description

When the Value type is a non-copyable class, code breaks at [].

It is because no moving insert() is provided but operate[]() uses insert():

  Value& operator[](const key_type& key) {
    return (*((this->insert(std::make_pair(key, Value()))).first)).second;
  }

So compiler is forced to use copy constructor of Value.
 

Comment 1 by danzh@chromium.org, May 26 2016

Cc: danzh@chromium.org
Owner: rch@chromium.org

Comment 2 by rch@chromium.org, May 26 2016

If I remember correctly, ours is simply a copy of the internal version so this should hopefully be easily fixable.
Components: Infra

Comment 4 by mmoss@chromium.org, Jan 2 2018

Components: -Infra Infra>Client>ChromeOS
[It appears that a bunch of old cros issues bulk-added the "Infra" component recently, but they should probably be "Infra>Client>ChromeOS".]
Status: Archived (was: Untriaged)

Sign in to add a comment