Fix user_type example in cheatsheet.md
Fixed example code as chaiscript::user_type is a function.
This commit is contained in:
parent
21048b9e65
commit
a97cb1530d
@ -77,7 +77,7 @@ chai.add(chaiscript::constructor<MyType (const MyType &)>(), "MyType");
|
|||||||
It's not strictly necessary to add types, but it helps with many things. Cloning, better errors, etc.
|
It's not strictly necessary to add types, but it helps with many things. Cloning, better errors, etc.
|
||||||
|
|
||||||
```
|
```
|
||||||
chai.add(chaiscript::user_type<MyClass>, "MyClass");
|
chai.add(chaiscript::user_type<MyClass>(), "MyClass");
|
||||||
```
|
```
|
||||||
|
|
||||||
## Adding Type Conversions
|
## Adding Type Conversions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user