-
Notifications
You must be signed in to change notification settings - Fork 264
Open
Labels
bugSomething isn't workingSomething isn't working
Description
AFAIK, there's no way to define template specializations in cppfront. I found this out when trying to define a custom std::formatter
.
Here's my expected syntax.
Foo: @struct type = {
x: i32 = 0;
}
std::formatter<Foo>: <> @struct type = {
parse: (this, inout ctx: std::format_parse_context) -> _ = {
return ctx.end();
}
format: <FormatContext> (this, foo: Foo, inout ctx: FormatContext) -> _ = {
return std::format_to(ctx.out(), "Foo({})", foo.x);
}
}
As of now, cppfront doesn't attempt to compile the std::formatter<Foo>
part.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working