Skip to content

Enable use of string litterals in ComboInput #514

@arntanguy

Description

@arntanguy

This is currently not supported, we always expect an std::vector<std::string> for the labels.

   #include <string_view>
   using namespace std::string_view_literals; // Enables sv suffix only
    static constexpr std::array holes = {"hole_0"sv, "hole_1"sv};
    using namespace mc_rtc::gui;
    ctl.gui()->addElement(this, {},
      ComboInput("Hole",
        holes,
        [this]() { return hole_; }, [this](const std::string & hole) { hole_ = hole; })
   );

Metadata

Metadata

Assignees

Labels

GUIRelated to GUI featuresenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions