function_templates.pyx 183 Bytes
Newer Older
Stefan Behnel's avatar
Stefan Behnel committed
1 2 3 4 5 6 7
# 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