MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / IntWrapper

Class IntWrapper

test/embind/test_custom_marshal.cpp:16–27  ·  view source on GitHub ↗

Class which wraps int and have no explicit or implicit conversions.

Source from the content-addressed store, hash-verified

14
15// Class which wraps int and have no explicit or implicit conversions.
16struct IntWrapper {
17 int get() const {
18 return value;
19 }
20 static IntWrapper create(int v) {
21 return IntWrapper(v);
22 }
23
24private:
25 explicit IntWrapper(int v) : value(v) {}
26 int value;
27};
28
29// Need for SFINAE-based specialization testing.
30template<typename T> struct IsIntWrapper : std::false_type {};

Callers 1

createMethod · 0.85

Calls

no outgoing calls

Tested by 1

createMethod · 0.68