1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
as_returns
==========
*turn an iterable argument into a multiple-return type*
.. code-block:: cpp
template <typename T>
struct as_returns_t { ... };
template <typename T>
as_returns_t<T> as_returns( T&& );
This allows you to wrap up a source that has ``begin`` and ``end`` iterator-returning functions on it and return it as multiple results into Lua. To have more control over the returns, use :doc:`sol::variadic_results<variadic_results>`.
.. literalinclude:: ../../../examples/source/as_returns.cpp
:linenos:
|