cppfront
cppfront copied to clipboard
A personal experimental C++ Syntax 2 -> Syntax 1 compiler
This PR adds support for *requires-expression*s (first based on ). This is the syntax, based on Cpp1's: | Cpp2 | Cpp1 | |:----------------------------------------------------------|:----------------------------------------------------------------| | `number: concept = requires(c: T) {`...
Resolves #700. Resolves #842. Resolves #1221.
**[T](#title)itle**: Varargs breaks with non-PODs. **[D](#desc)escription**: With Clang, an error stopped me from having a broken program: . With MSVC, this is actually just a warning. With GCC, there's no...
**[T](#title)itle**: Non-object declaration before `this` member [ICE][]s. **[M](#rep)inimal reproducer** (): ```Cpp2 my_time: type = { rep: type == cpp2::longdouble; this: duration; } main: () = { } ``` Commands: ```bash...
**Title**: Double move when passing by move. **Minimal reproducer** (): ```Cpp2 main: () = { x := 0; :(y) = 0; (move x); } ``` **Commands**: ```bash cppfront -clean-cpp1 main.cpp2...
See : > The one case we can handle is when source local name lookup results in a variable. > If it isn't templated, `func(obj)` can't be valid, so the...
**[T](#title)itle**: UFCS with variable template in scope fails. **[D](#desc)escription**: `std::vector().empty()` will fail given `using std::views::empty;`. That should end up calling the member `empty` of `std::vector`. But the UFCS macro fails...
[perfect backwarding]: https://quuxplusone.github.io/blog/2018/09/25/perfect-backwarding/ **[T](#title)itle**: Need `decltype(auto)` for [perfect backwarding][]. **[D](#desc)escription**: At first, a Cpp2 `-> forward _` _return-list_ lowered to the Cpp1 return type `auto&&`. #175 noted this was unsafe,...
[order independence]: https://github.com/hsutter/cppfront/discussions/641#discussioncomment-6869498 **[T](#title)itle**: Can't constrain member function with UFCS on callable data member. **[D](#desc)escription**: A few fundamental problems make it hard or impossible to constrain generic code that uses...
**[T](#title)itle**: `@enum` value can't be interpolated. **[M](#rep)inimal reproducer** (): ```Cpp2 command: @enum type = { count; filter; } main: () = { _ = "(command::count)$"; } ``` Commands: ```bash cppfront...