Skip to content

Passing a constexpr std::string_view to LEXY_KEYWORD #203

@bruno-j-nicoletti

Description

@bruno-j-nicoletti

This is very minor issue with the API.

For constants I use constexpr over #define wherever possible. I want to have the set of keywords used by my grammar defined via constexpr std::string_view and use them elsewhere in my code. Unfortunately the LEXY_KEYWORD macro relies on values passed to it to be literals, so I need to #define them.

Not a pressing issue, but a nice API change if it is simple enough to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions