cppfront
cppfront copied to clipboard
A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Closes https://github.com/hsutter/cppfront/issues/112 The current implementation fails to handle cases when there is a lambda in the function where multi-return values are used. The issue is with the `get_declaration_of()` function that...
When dealing with multiple return values cppfront creates local `cpp2::deferred_init` values and moves them on the return of the function. It works in the below code: ```cpp fun: () ->...
While looking for the symbol there is a loop that searches backward using normal iterators. The loop will never check symbols.cbegin() as it is excluded by `i != symbols.cbegin()` condition....
This feature is based on https://youtu.be/ARYP83yNAWk?t=2227 Long time ago I wrote to you an email about it, but it was lost somewhere in history of civilisation ... Anyway, I just...
The destructor of `cpp2::out` destroys the object if an exception has been called, without resetting the `init` flag. This causes the destructor to be called twice. See below for a...
The current implementation allows for writing below code ```cpp args : std::span = (argv, argc as std::size_t); c : std::ifstream = args.back(); // int = { max_uint8 := std::numeric_limits::max(); max_int8...
Thanks to other experiments I have added the possibility to inspect if a type is a template. That will allow generic code to check if we deal with `std::vector`, `std::array`,...
Using a function declaration as an expression (i.e., a lambda), with the `-d` cppfront flag enabled causes an abort due to an assert. Note that the lambda must contain other...
Thanks to https://github.com/hsutter/cppfront/pull/93 I was able to implement the `main` function that takes arguments. ```cpp main: (argc : int, argv : **char) -> int = { // ... } ```...