Inquiry with file node-addon-examples/5_function_factory/node_0.12/addon.cc
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Start with node-addon-examples/5_function_factory/node_0.12/addon.cc and review how the function factory example supplies its callback. The issue does not define a concrete repository change or a done condition; first determine whether the example or its documentation should explain using a private C++ member function, then identify an appropriate example or documentation test if one exists.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hi, anyone reading this,
The file node-addon-examples/5_function_factory/node_0.12/addon.cc contains a function factory, that's all well and good, but when I do something similiar, instead of using a global function, I'm using an instance function, (sorry, bad C++ vocab, I'm only new...) a function that's a private member of a class, and I want to use that as the function body, where the example uses
void MyFunction(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = Isolate::GetCurrent();
HandleScope scope(isolate);
args.GetReturnValue().Set(String::NewFromUtf8(isolate, "hello world"));
}
as the body. The issue is I get an error when doing this, the error is as follows: error C3867: 'Class::SampleFunction': non-standard syntax; use '&' to create a pointer to member and I have no idea what to do about it.
- Vorherrschende Sprache
- C++
- Sterne
- 2.6k
- Forks
- 602
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus nodejs/node-addon-examples
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 38/100
nodejs/node-addon-examples#585 · 1 Reaktion ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 38/100
nodejs/node-addon-examples#530 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
nodejs/node-addon-examples#445 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 32/100
nodejs/node-addon-examples#444 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
nodejs/node-addon-examples#381 ·
Alle Issues in nodejs/node-addon-examples
Ähnliche Issues
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 92/100
autowarefoundation/autoware_universe#13413 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
automated-analysis bug memory-safety
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
gazebosim/gz-sensors#662 · 1 Kommentar ·