Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
piotr5 opened this issue Nov 2, 2024 · 0 comments
Open

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

piotr5 opened this issue Nov 2, 2024 · 0 comments

Comments

@piotr5
Copy link

piotr5 commented Nov 2, 2024

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant