From bd3fe0cac583739bc0d7c4b5c8f301bb350abca0 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Fri, 30 Aug 2019 00:19:31 -0400 Subject: Renamed lib to deps so github will ignore it for language stats --- lib/sol2/docs/source/api/new_table.rst | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 lib/sol2/docs/source/api/new_table.rst (limited to 'lib/sol2/docs/source/api/new_table.rst') 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` and :doc:`sol::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 -- cgit v1.2.3