dimanche 20 décembre 2020

How to pass a String without quotes to Variadic templates?

template<typename... Args>
void callJavaScript(const Args&... args) {
     // TO-DO
}

callJavaScript({
   console.log("Hello World")
})

Is it possible to accomplish something like this with Variadic templates (with/without Macro hack)?

Instead

callJavaScript("{
   console.log('Hello World')
}")

I want

callJavaScript({
   console.log("Hello World")
})

Aucun commentaire:

Enregistrer un commentaire