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