diff options
author | Andy Belle-Isle <abelleisle@protonmail.com> | 2022-11-13 13:55:26 -0600 |
---|---|---|
committer | Andy Belle-Isle <abelleisle@protonmail.com> | 2022-11-13 13:55:26 -0600 |
commit | 38e2036d031bdeaea76ef4b6c3c2af5247ed93ec (patch) | |
tree | b1401ba2ef33d08dbc528aadbf61f0d4aedad63d /lib/sol2/docs/source/api/new_table.rst | |
parent | 57a1eb6fdccb9023557d0a470796f423f063948a (diff) | |
parent | 57013add5b7c524086272be7d395f9ec5109bde2 (diff) |
Merge remote-tracking branch 'origin/lib-cleanup' into world
Diffstat (limited to 'lib/sol2/docs/source/api/new_table.rst')
-rw-r--r-- | lib/sol2/docs/source/api/new_table.rst | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/sol2/docs/source/api/new_table.rst b/lib/sol2/docs/source/api/new_table.rst deleted file mode 100644 index 427a12b..0000000 --- a/lib/sol2/docs/source/api/new_table.rst +++ /dev/null @@ -1,23 +0,0 @@ -new_table -========= -*a table creation hint to environment/table* - - -.. code-block:: cpp - - struct new_table; - - constexpr const new_table create = new_table{}; - -``sol::new_table`` serves the purpose of letting you create tables using the constructor of :doc:`sol::table<table>` and :doc:`sol::environment<environment>`. It also disambiguates the other kinds of constructors, so is **necessary** to be specified. Leaving it off will result in the wrong constructor to be called, for either ``sol::table`` or ``sol::environment``. - -members -------- - -.. code-block:: cpp - :caption: constructor: new_table - :name: sol-new_table-constructor - - new_table(int sequence_hint = 0, int map_hint = 0); - -The constructor's sole purpose is to either let you default-constructor the type, in which case it uses the values of "0" for its two hints, or letting you specify either ``sequence_hint`` or both the ``sequence_hint`` and ``map_hint``. Each hint is a heuristic helper for Lua to allocate an appropriately sized and structured table for what you intend to do. In 99% of cases, you will most likely not care about it and thusly will just use the constant ``sol::create`` as the second argument to object-creators like ``sol::table``'s constructor.
\ No newline at end of file |