Skip to content

forward_as_tuple not working as expected #142

@Mogball

Description

@Mogball

The current code for map insert is

template<typename K, typename V>
pair<iterator, bool> insert(K &&key, V &&val) 
{ return m_table.insert_unique(make_tuple(forward<K>(key), forward<V>(val))); }

but if you replace it with

return m_table.insert_unique(forward_as_tuple(key, val));

insertion will create duplicates for dynamic types like dynamic_string

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions