|
|
|
|
|
by cdevfr
4206 days ago
|
|
Sure it is possible. Just pass the constructor your type: my_type* t = New( MyType ) ; Where MyType passes information to New() of what to create. ... I don't know what I'm downvoted. This clearly works. The naive solution without macros would have MyType be a simple integer and New() has a switch statement. But it is easy to avoid that. |
|