lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Sorry, I press the "Send" button too early.

> study an alternate syntax using << and >> ...

In fact, it was very easy to add that new syntax, be reusing overloaded classes constructors.
So it is already there, in version 2.0.1

If you like the <iostream> usage (I personally don't), you now have the possibility to write something like this:

void test()
{
  lua::Lua L;
  const char* result;
  L << 42 <<  ", Hello " << L"World" >> result || "return table.concat{...}";
  std::cout << result;
}

And the third line is in fact just of wrapper on top of:

L.PCall("return table.concat{...}", Inputs(42, ", Hello ", L"World"), Outputs(result));