manual: Remove stmt or expr template related text from manual (#9321)

This commit is contained in:
Tomohiro 2018-10-12 16:00:27 +09:00 • committed by Andreas Rumpf
commit d2b04a8bc7

View file

@ -3037,7 +3037,7 @@ The `case expression` is again very similar to the case statement:
As seen in the above example, the case expression can also introduce side As seen in the above example, the case expression can also introduce side
effects. When multiple statements are given for a branch, Nim will use effects. When multiple statements are given for a branch, Nim will use
the last expression as the result value, much like in an `expr` template. the last expression as the result value.
Table constructor Table constructor
----------------- -----------------
@ -4611,8 +4611,8 @@ The concept types can be parametric just like the regular generic types:
M.data[m * M.N + n] = v M.data[m * M.N + n] = v
# Adapt the Matrix type to the concept's requirements # Adapt the Matrix type to the concept's requirements
template Rows*(M: type Matrix): expr = M.M template Rows*(M: type Matrix): int = M.M
template Cols*(M: type Matrix): expr = M.N template Cols*(M: type Matrix): int = M.N
template ValueType*(M: type Matrix): type = M.T template ValueType*(M: type Matrix): type = M.T
------------- -------------
@ -5036,9 +5036,8 @@ an ``immediate`` pragma and then these templates do not take part in
overloading resolution and the parameters' types are *ignored* by the overloading resolution and the parameters' types are *ignored* by the
compiler. Explicit immediate templates are now deprecated. compiler. Explicit immediate templates are now deprecated.
**Note**: For historical reasons ``stmt`` is an alias for ``typed`` and **Note**: For historical reasons ``stmt`` was an alias for ``typed`` and
``expr`` an alias for ``untyped``, but new code should use the newer, ``expr`` was an alias for ``untyped``, but they are removed.
clearer names.
Passing a code block to a template Passing a code block to a template
@ -5129,9 +5128,6 @@ also ``varargs[untyped]`` so that not even the number of parameters is fixed:
However, since a template cannot iterate over varargs, this feature is However, since a template cannot iterate over varargs, this feature is
generally much more useful for macros. generally much more useful for macros.
**Note**: For historical reasons ``varargs[expr]`` is not equivalent
to ``varargs[untyped]``.
Symbol binding in templates Symbol binding in templates
--------------------------- ---------------------------