cppfront
cppfront copied to clipboard
A personal experimental C++ Syntax 2 -> Syntax 1 compiler
@hsutter regarding your question: https://github.com/hsutter/cppfront/blob/bf5998a5e9145f11a935c2700b1db50f6e2de2fa/include/cpp2util.h#L809 I am currently trying to use cppfront to build my project (that's why I send PRs - I am implementing what I am missing). I...
Having a single expression function that uses multiple return values syntax compiles to bad cpp1 code. ```cpp fun: () -> (i:int) = i = 42; ``` ## Steps ``` tests...
UFCS is not triggered when a function is called as a class method on a class member variable. ```cpp main: () -> int = { p := std::pair(1,2); p.first.ufcs(); //...
the following code segfaults: using `while first int = { words: std::vector = ( "decorated", "hello", "world" ); first: std::vector::iterator = words.begin(); last : std::vector::iterator = words.end(); while first >...
I was experimenting a little bit and discovered that UFCS would not work on a pointer that is being de-referenced for example: ```cpp main : () -> int = {...
Convenience script for running regression tests on Linux. Current results on Ubuntu and gcc11: ``` ./run-tests.sh TRANSPILE: 34 SUCCESS 8 FAILED ./test-results/mixed-lifetime-safety-pointer-init-3.cpp2 ./test-results/mixed-initialization-safety-1.cpp2 ./test-results/mixed-lifetime-safety-pointer-init-2.cpp2 ./test-results/mixed-initialization-safety-2.cpp2 ./test-results/mixed-lifetime-safety-pointer-init-1.cpp2 ./test-results/pure2-bounds-safety-pointer-arithmetic-error.cpp2 ./test-results/pure2-lifetime-safety-pointer-init-1.cpp2 ./test-results/pure2-lifetime-safety-reject-null.cpp2 COMPILE:...
I am a C++ programmer with lots of personal projects using C++. I am really curious to understand why is there a need of "new syntax" for C++ and why...
The current implementation has no safety checks for: * deduced pointers from cpp1 or functions that deduce return types, * deduced pointers from cpp2 variables or functions, This change brings...
Fixed implicit casts to bool. Replaced "auto" with "auto*" for readability. Added "noexcept" to move constructor and move assignment operator at c_raii class. Signed-off-by: MarchMore
Signed-off-by: MarchMore