From 115dfe39ebeaed5418fffd8282cbf46124dc698d Mon Sep 17 00:00:00 2001 From: ThePhD Date: Thu, 7 Jul 2016 20:32:32 -0400 Subject: [PATCH] [ci skip] simple_usertype docs update --- docs/source/api/table.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/source/api/table.rst b/docs/source/api/table.rst index 6c5c80ca..629d8c11 100644 --- a/docs/source/api/table.rst +++ b/docs/source/api/table.rst @@ -94,6 +94,19 @@ This function returns the size of a table. It is only well-defined in the case o This class of functions creates a new :doc:`usertype` with the specified arguments, providing a few extra details for constructors. After creating a usertype with the specified argument, it passes it to :ref:`set_usertype`. +.. code-block:: cpp + :caption: function: setting a simple usertype + :name: new-simple-usertype + + template + table& new_simple_usertype(const std::string& name, Args&&... args); + template + table& new_simple_usertype(const std::string& name, Args&&... args); + template + table& new_simple_usertype(const std::string& name, constructors ctor, Args&&... args); + +This class of functions creates a new :doc:`simple usertype` with the specified arguments, providing a few extra details for constructors and passing the ``sol::simple`` tag as well. After creating a usertype with the specified argument, it passes it to :ref:`set_usertype`. + .. code-block:: cpp :caption: function: creating an enum :name: new-enum