summaryrefslogtreecommitdiff
path: root/tests/errors/cpp_rvalue_reference_support.pyx
blob: e1e7015c9f63d3e61f4aba275a7feee3e437631a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# mode: error
# tag: werror, cpp, cpp11

# These tests check for unsupported use of rvalue-references (&&)
# and should be removed or cleaned up when support is added.

cdef int&& x

cdef void foo(int&& x):
    pass

cdef int&& bar():
    pass

cdef extern from *:
    """
    void baz(int x, int&& y) {}

    template <typename T>
    void qux(const T&& x) {}
    """
    cdef void baz(int x, int&& y)
    cdef void qux[T](const T&& x)


_ERRORS="""
7:8: C++ rvalue-references cannot be declared
9:13: Rvalue-reference as function argument not supported
12:14: Rvalue-reference as function return type not supported
22:17: Rvalue-reference as function argument not supported
23:20: Rvalue-reference as function argument not supported
"""