jeremyong / Selene

Simple C++11 friendly header-only bindings to Lua
zlib License
813 stars 117 forks source link

Enable loading from streams (e.g. std::cin or file streams) #175

Closed hmenke closed 5 years ago

hmenke commented 7 years ago

This PR will enable loading of Lua chunks from streams. With help of this one can write programs which take Lua code via stdin, i.e. ./a.out < script.lua. The following code illustrates this.

#include <selene.h>
#include <iostream>

int main()
{
  sel::State L{true};
  L.Load(std::cin);
  // ...
}
hmenke commented 5 years ago

Selene has been abandoned and sol2 is much better anyway, so I'm closing this.