Commit 4de648a2 authored by Tom Niget's avatar Tom Niget

Fix class creation

parent 6e8e1738
...@@ -22,4 +22,4 @@ if __name__ == "__main__": ...@@ -22,4 +22,4 @@ if __name__ == "__main__":
# print(g("abc", 213)) # expected error # print(g("abc", 213)) # expected error
print(H().h(6)) print(H().h(6))
Box(6) #Box(6)
\ No newline at end of file \ No newline at end of file
...@@ -55,10 +55,8 @@ def emit_class(name: str, node: ConcreteType) -> Iterable[str]: ...@@ -55,10 +55,8 @@ def emit_class(name: str, node: ConcreteType) -> Iterable[str]:
yield "template <typename... T>" yield "template <typename... T>"
yield "auto operator() (T&&... args) const {" yield "auto operator() (T&&... args) const {"
yield "Obj obj;" yield "return referencemodel::rc(Obj(std::forward<T>(args)...));"
yield "dot(obj, __init__)(std::forward<T>(args)...);"
#yield "return referencemodel::rc(Obj(std::forward<T>(args)...));"
yield "return referencemodel::rc(obj);"
yield "}" yield "}"
yield f"}};" yield f"}};"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment