Skip to content

c++20 moves a lot of things to constexpr, why not boost::spirit? #798

@piotr5

Description

@piotr5

for now the workaround is to manually copy boost::spirit::unicode::detail::category_lookup() into a constexpr function if I wish to make use of the table, and then maybe reimplement the query.hpp file's inline functions (i.e. boost::spirit::ucd namespace of functions identifying what each character does do) as constexpr too. then I can at least get that tiny part of the functionality in boost::spirit to work at compiletime. any reason why utf shouldn't be parsed at compile-time too?

i.e. my proposal is to put constexpr in front of all inline functions in include/spirit/home/support/char_encoding/unicode/*.hpp
to make those tables more accessible at compile-time!
after that look through the basic functionality code of boodt::spirit and add constexpr everywhere in the headers' inline functions where the compile-option -Winvalid-constexpr remains silent. c++20 allows for using vectors and strings at compile-time now! so please do some compile-time parsing with those constexpr strings! but that's optional and an ongoing effort. I'd be happy if boost::spirit could at least tell me what kind of characters the programmers have put into their source-code's text-constants to at least do some Concepts...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions