cppfront
cppfront copied to clipboard
A personal experimental C++ Syntax 2 -> Syntax 1 compiler
C++ compilers at high warning levels warn about unused variables or class members. This PR adds `[[maybe_unused]]` to anonymous objects (named `_`) at function and class scope (excludes namespace scope,...
**Describe the bug** When compiling the regression-tests with a high warning level there are warnings in `cpp2util.h` as well as in some of the generated C++ code that cppfront produces....
## Suggestion Cppfront could support conditional compilation where unselected branches are dropped and not lowered to Cpp1. This would be useful for at least two cases: **1. When a Cpp2...
After pulling in 510eae80bf3b92c7e210817c329e4b417d0012ec: Transpiling the program below I get: csample.cpp2(49,5): error: local variable 'start' is not used; consider changing its name to '_' to make it explicitly anonymous, or...
Transpiling Size: type == size_t; Real: type == double; Mat: type = { Elem: @struct type = { entry: Real; colind: Size; } data: ::std::valarray<::std::valarray<Elem>>; operator[]: (inout this, row: Size,...
After pulling in 510eae80bf3b92c7e210817c329e4b417d0012ec: main: () = { a: std::any = 1; std::cout
**[T](#title)itle**: `constexpr` without `==`. **[D](#desc)escription**: In reading [P2996R0 Reflection for C++26 2.3 List of Types to List of Sizes](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2996r0.html#list-of-types-to-list-of-sizes), I couldn't help but wonder, how would we declare an uninitialized...
Resolves #534. Resolves #595. Resolves #628 (as a discussion, this needs to be manually closed). Adds what's needed to diagnose #572.
**Describe the bug** Initialization of a two-dimensional std::array appears to be broken. **To Reproduce** Steps to reproduce the behavior: 1. Sample code ```c++ main: () = { board: std::array =...
**[T](#title)itle**: Type-scope object alias of nested type needs explicit qualification. **[D](#desc)escription**: This is relevant to type-scope object alias emitted during Phase 2 "Cpp2 type definitions and function declarations" (all of...