Selaa lähdekoodia

docs: Update section 'Automatic stack layout'

Ole 9 vuotta sitten
vanhempi
commit
ee3622b641

+ 4 - 9
docs/mkdocs/advanced-stack-interaction.md

@@ -31,19 +31,14 @@ exception that it returns the resulting value back to the Lua stack.
 luwra::map<string(string, int)>(lua, n, foo);
 ```
 
-## Invoke a function with Lua values
-[apply][luwra-apply] is similiar to [direct][luwra-direct]. It differs from `direct` by providing
-specific overloads for function pointers and function objects. Although `direct` works with function pointers
-and function objects, it is often more convenient to use `apply` since it allows the compiler to
-infer the *stack signature* without providing a template parameter.
+## Automatic stack layout
+[apply][luwra-apply] is similiar to [direct][luwra-direct]. It differs from `direct` because it is
+able to infer the stack layout from the given `Callable`.
 
 Provided a function `foo` which has been declared as used in the example above:
 
 ```c++
 string foo(string bar, int baz);
-
-// ... or with a function object
-function<string(string, int)> foo = /* magic */;
 ```
 
 One would use `foo` like this:
@@ -61,5 +56,5 @@ string result = luwra::apply(lua, n, [](string a, int b) -> string {
 ```
 
 [luwra-direct]: /reference/namespaceluwra.html#aa20e363f38b3ae5a168cf40365f5646a
-[luwra-apply]: /reference/namespaceluwra.html#a839077ddd9c3d0565a40c574bc8e9555
 [luwra-map]: /reference/namespaceluwra.html#a9f24fc70cb48531cf1e3da6a3a741971
+[luwra-apply]: /reference/namespaceluwra.html#a839077ddd9c3d0565a40c574bc8e9555

+ 4 - 9
docs/output/advanced-stack-interaction/index.html

@@ -78,7 +78,7 @@
                 
                     <li><a class="toctree-l4" href="#manual-stack-layout">Manual stack layout</a></li>
                 
-                    <li><a class="toctree-l4" href="#invoke-a-function-with-lua-values">Invoke a function with Lua values</a></li>
+                    <li><a class="toctree-l4" href="#automatic-stack-layout">Automatic stack layout</a></li>
                 
             
             </ul>
@@ -160,16 +160,11 @@ exception that it returns the resulting value back to the Lua stack.</p>
 <pre><code class="c++">luwra::map&lt;string(string, int)&gt;(lua, n, foo);
 </code></pre>
 
-<h2 id="invoke-a-function-with-lua-values">Invoke a function with Lua values</h2>
-<p><a href="../reference/namespaceluwra.html#a839077ddd9c3d0565a40c574bc8e9555">apply</a> is similiar to <a href="../reference/namespaceluwra.html#aa20e363f38b3ae5a168cf40365f5646a">direct</a>. It differs from <code>direct</code> by providing
-specific overloads for function pointers and function objects. Although <code>direct</code> works with function pointers
-and function objects, it is often more convenient to use <code>apply</code> since it allows the compiler to
-infer the <em>stack signature</em> without providing a template parameter.</p>
+<h2 id="automatic-stack-layout">Automatic stack layout</h2>
+<p><a href="../reference/namespaceluwra.html#a839077ddd9c3d0565a40c574bc8e9555">apply</a> is similiar to <a href="../reference/namespaceluwra.html#aa20e363f38b3ae5a168cf40365f5646a">direct</a>. It differs from <code>direct</code> because it is
+able to infer the stack layout from the given <code>Callable</code>.</p>
 <p>Provided a function <code>foo</code> which has been declared as used in the example above:</p>
 <pre><code class="c++">string foo(string bar, int baz);
-
-// ... or with a function object
-function&lt;string(string, int)&gt; foo = /* magic */;
 </code></pre>
 
 <p>One would use <code>foo</code> like this:</p>

+ 1 - 1
docs/output/index.html

@@ -200,5 +200,5 @@ means that all functions and classes can operate on <a href="http://www.lua.org/
 
 <!--
 MkDocs version : 0.15.3
-Build Date UTC : 2016-05-22 15:42:46.579571
+Build Date UTC : 2016-05-22 15:50:10.377273
 -->

File diff suppressed because it is too large
+ 0 - 0
docs/output/mkdocs/search_index.json


Some files were not shown because too many files changed in this diff