Cppfront is an experimental compiler [by Herb Sutter] from a potential C++ 'syntax 2' (Cpp2) to today's 'syntax 1' (Cpp1), to learn some things, prove out some concepts, and share some ideas. This compiler is a work in progress and currently hilariously incomplete... basic functions work, classes will be next, then metaclasses and lightweight exceptions.
Questions tagged [cppfront]
5 questions
3
votes
2 answers
What is mathematically unsound about a >= b < c chained comparison?
Herb Sutter implemented only a subset of chained comparisons in his cppfront, stating in his keynote (https://youtu.be/fJvPBHErF2U?si=RqcR661yBzcQ8r5_&t=850) that a >= b < c is "mathematically unsound". He shows three examples of chained…

Paul Jurczak
- 7,008
- 3
- 47
- 72
3
votes
1 answer
create QApplication or how to const cast in cppfront
I am playing with cppfront (https://github.com/hsutter/cppfront), a possible C++ successor, in combination with Qt. I am trying to replicate the simplest possible widget application showing just an empty widget.
In C++ (aka cpp1) it would be like…

HiFile.app - best file manager
- 7,273
- 2
- 32
- 80
1
vote
1 answer
How can I build and run cppfront program with g++-12 within VS Code on Linux?
I am able to use Linux command line to build a cppfront hello world program with g++-12. I have installed VS Code with 'cpp2 (cppfront) Syntax Highlighting v0.0.2' & 'C/C++ Extension Pack v1.3.0' extensions.
I'm looking to build and run this example…

CW Holeman II
- 4,661
- 7
- 41
- 72
0
votes
0 answers
Astyle format a cpp2 file automatically in VS Code?
Using Astyle extension with VS Code. I can format a cpp2 file with Ctrl+Shift+I.
How can I have the formatting happen automatically at other times such as a text paste or file save?
Installed:
C/C++ Extension Pack
cpp2 (cppfront) Syntax…

CW Holeman II
- 4,661
- 7
- 41
- 72
0
votes
1 answer
How do I access the cppfront executable's help doc?
I tried running cppfront --help, and got the following output:
--help...
--help: error: source filename must end with .cpp2 or .h2: --help
I expected using --help to cause the cppfront executable to print its help message / doc string. --help is a…

starball
- 20,030
- 7
- 43
- 238