Commit bc26e4ed authored by gabrieldemarmiesse's avatar gabrieldemarmiesse

Moved a template code snippet to the examples directory.

parent 084a25f5
# distutils: language = c++
cdef extern from "<algorithm>" namespace "std":
T max[T](T a, T b)
print(max[long](3, 4))
print(max(1.5, 2.5)) # simple template argument deduction
......@@ -339,13 +339,9 @@ a typedef for its template parameters it is preferable to use that name here.
Template functions are defined similarly to class templates, with
the template parameter list following the function name::
the template parameter list following the function name:
cdef extern from "<algorithm>" namespace "std":
T max[T](T a, T b)
print(max[long](3, 4))
print(max(1.5, 2.5)) # simple template argument deduction
.. literalinclude:: ../../examples/userguide/wrapping_CPlusPlus/function_template.pyx
Standard library
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment