You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Guannan says:
For my own stuff I have patch for C++:
override def quote(s: Def): String = s match {
case Const(()) => "std::monostate{}";
case _ => super.quote(s)
}
and
override def primitive(t: String): String = t match {
case "Unit" => "std::monostate"
case _ => super.primitive(t)
}
I think we can either 1) pretend Scala Unit is C void, which is the current status 2) or add some macro of Unit in C (eg, define unit value is char 0), 3) or add a Rep[Void] type in Scala/LMS which correspond to C void type (2) requires changes of the generated code (as well as existing projects and tests)(3) requires changes from the scala meta programs
The text was updated successfully, but these errors were encountered:
Guannan says:
For my own stuff I have patch for C++:
override def quote(s: Def): String = s match {
case Const(()) => "std::monostate{}";
case _ => super.quote(s)
}
and
override def primitive(t: String): String = t match {
case "Unit" => "std::monostate"
case _ => super.primitive(t)
}
I think we can either 1) pretend Scala Unit is C void, which is the current status 2) or add some macro of Unit in C (eg, define unit value is char 0), 3) or add a Rep[Void] type in Scala/LMS which correspond to C void type (2) requires changes of the generated code (as well as existing projects and tests)(3) requires changes from the scala meta programs
The text was updated successfully, but these errors were encountered: