Skip to content

Instantly share code, notes, and snippets.

@jeremyong
Last active January 2, 2016 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremyong/8365304 to your computer and use it in GitHub Desktop.
Save jeremyong/8365304 to your computer and use it in GitHub Desktop.
Improved call to a lua function using Luab
#include <string>
#include <cassert>
#include "selene.h"
int main() {
sel::State state;
l.Load("example.lua")
int difference;
std::string greeting;
std::tie(difference, greeting) = state.Call<int, std::string>("subtract_and_hello", 1, 3);
assert(difference == -2 && greeting == "hello");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment