pmed / v8pp

Bind C++ functions and classes into V8 JavaScript engine
http://pmed.github.io/v8pp/
Other
887 stars 119 forks source link

Factory in c++17 branch #126

Closed ayles closed 4 years ago

ayles commented 4 years ago

In our project we need to implement extension constructor with FunctionCallbackInfo as argument, but it is not possible without removed factory. We can override Traits (alot of work) or pass custom function to ctor (alot of work + necessity to call AdjustAmountOfExternalAllocatedMemory in this function). So maybe there should be some adjustments in API?

pmed commented 4 years ago

The factory was removed in this branch because it duplicates the custom ctor function argument for the class_::ctor<>().

Honestly I can't imagine a lot of work comparing to the prior factory usage.