cppfront
cppfront copied to clipboard
A personal experimental C++ Syntax 2 -> Syntax 1 compiler
The following code does not compile. _main.cpp2_ ```cpp main: () = { x: u8 = 1; y: u8 = 2; z: u8 = x + y; std::cout
**[T](#title)itle**: Improving diagnostics with "Reasons:" and "Suggestions:". **[D](#desc)escription**: Updating my code, I kept hitting: https://github.com/hsutter/cppfront/blob/68b716abe3e4b623e875d68a2b9b3f0efcd39b45/source/to_cpp1.h#L2433 I'm doubting the usefulness of this error as it is. It's preventing me from writing...
**[T](#title)itle**: Infinite recursion in block parameter named after initializing capture. **[M](#rep)inimal reproducer** (): ```Cpp2 main: () = { test_overloads := 0; _ = :() = { (test_overloads := test_overloads$) {...
**[T](#title)itle**: Variable initialized after equally named capture rejected. **[M](#rep)inimal reproducer** (): ```Cpp2 main: () = { test_overloads := 0; _ = :() = { test_overloads := test_overloads$; }; } ```...
**[T](#title)itle**: fix(parse): diagnose function expression without initializer **[D](#desc)escription**: I tried writing a function type, but accidentally put a `:` in front. **[M](#rep)inimal reproducer** (): ```Cpp2 require_fn: type == std::function void>;...
**[T](#title)itle**: fix(reflect): recognize default constructor overload in `@basic_value`. **[D](#desc)escription**: Now that we have default function arguments, it's possible for a default constructor to overload with a constructor with default arguments....
Satisfy the `std::ranges::bidirectional_range` constraint, so that `cpp2::args` can be used with `std::ranges` adapters, etc. See #1280.
My next code which I couldn't update: ```Cpp2 magnitude2d: type == decltype(_cartesian_magnitude2d(std::type_identity()))::type; vector2d: type == std::type_identity_t::type; ``` The Cpp1 syntax uses [_computed-type-specifier_](https://eel.is/c++draft/gram), which I modeled with _computed-type-id_. Supporting C++26's pack...
**Describe the bug** If the definitive last use of a variable is inside a fold expression, cppfront will still emit `cpp2::move()` even though this will most likely lead to multiple...
I get a compiler error when I compile the sources. - **compiler:** clang version 18.1.6 - **standard library:** MSVC version 14.35.32215 - **OS**: Windows 11 version 23H2 This is the...