cppfront
cppfront copied to clipboard
A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Current implementation of `is(std::variant)` and `as(std::variant)` is complicated and limited only to 10 types hold in variant. They can be implemented with funtions from standard libraries: * `std::holds_alternative`, and *...
The current implementation of alternatives for inspect handles only types. It makes it impossible to replace the cpp1 switch with it. This change brings support for literals in alternatives which...
I was curious to see if cpp2 improvements included iterator invalidation safety so I tried the following: ``` #include main: () -> int = { v : std::vector = (1,...
[BUG] CPP2_UFCS macros don't work with template functions/methods with multiple template arguments
CPP2_UFCS macro is based on variadic macros. That means that every comma `,` in the macro separates two arguments for the macro (unless surrounded by parentheses `()`. That makes below...
https://github.com/hsutter/cppfront/wiki/Design-note%3A-Unambiguous-parsing#a-first-match-wins-there-are-no-comma-expressions-and-a-relational-comparison-in-a-template-argument-must-be-parenthesized > In Cpp2 my intent is to make this a non-problem (famous last words!) by addressing this in two chunks: > * Cpp2 has no comma operator, so that...
- Run the tool on file containing malformed data. - No command line switches or parameters. - The tool is stuck in infinite loop. - The input `P:"P` is also...
The "Where's the Documentation" section states "I'm not posting much documentation because that would imply this project is intended for others to use — if it someday becomes ready for...
The code is basically only lists of consecutive elements. The idea behind this suggestion is to try to only have a more uniform syntax for all of them, to help...
Ever since the introduction of move semantics a ton of boilerplate code has been written to enable moving the ownership of variables into arguments to functions or constructors. Have you...
As was suggested on [Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022](https://www.youtube.com/watch?v=ELeZAKCN4tY&list=PLHTh1InhhwT6c2JNtUiJkaH8YRqzhU7Ag&index=51&t=2383s) in QA session, to use all strict features by default: 1) Do all...