Skip to content

etl::const_map creation not user friendly #1341

Description

@relativityspace-jsmith

Hi, I've noticed that creating const_map instances is not particularly easy. This is partly due to the need to repeat types a lot, and partly due to the fact that if the backing array is not sorted already, the map doesn't work. See here for more details: #1306

Ideally, we could get a new etl::make_const_map function that accepts an initializer list, and then would deduce all the needed types and sort the K-V pairs before creating the map. Also, we should probably add a note in the docs that etl::const_map requires a pre-sorted array, and a static assert that verifies this is the case so the user doesn't get unexpected behavior.

Thanks for taking a look at this!

Metadata

Metadata

Assignees

No one assigned

    Type

    Fields

    No fields configured for Task.

    Projects

    Status
    To do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions