mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
I am not very smart.
This commit is contained in:
parent
0e9bb67576
commit
56c71502b3
|
@ -10,10 +10,10 @@ int main() {
|
|||
sol::optional<int> x = lua["bark"];
|
||||
// x will have a value
|
||||
if (x) {
|
||||
return -1;
|
||||
std::cout << "x has no value, as expected" << std::endl;
|
||||
}
|
||||
else {
|
||||
std::cout << "x has no value, as expected" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
lua["bark"] = sol::lua_nil;
|
||||
|
|
Loading…
Reference in New Issue
Block a user