File: variadic_results.rst

package info (click to toggle)
sol2 3.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,096 kB
  • sloc: cpp: 43,816; ansic: 1,018; python: 356; sh: 288; makefile: 202
file content (11 lines) | stat: -rw-r--r-- 577 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
variadic_results
================
*push multiple disparate arguments into lua*

.. code-block:: cpp
	
	struct variadic_results : std::vector<object> { ... };

This type allows someone to prepare multiple returns before returning them into Lua. It derives from ``std::vector``, so it can be used exactly like that, and objects can be added using the various constructors and functions relating to :doc:`sol::object<object>`. You can see it and other return-type helpers in action `here`_.

.. _here: https://github.com/ThePhD/sol2/blob/develop/examples/source/multi_results.cpp