summaryrefslogtreecommitdiffstats
path: root/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/templatedcallables/src/templated_callables.h
blob: c745ccad215e21565c1373827825a6d980a53ea4 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#pragma once

// dummy declaration
namespace std {
    template <class T, int N> struct array;
}

template <typename T>
class TemplatedClass
{
public:
    template <typename U>
    void templated_method_with_type_template_parameter(U);

    template <typename U = bool>
    void templated_method_with_defaulted_type_template_parameter(U);

    template <typename... Ts>
    void templated_method_with_type_template_parameter_pack(Ts...);

    template <int Size>
    void templated_method_with_non_type_template_parameter();

    template <int Size = 10>
    void templated_method_with_defaulted_non_type_template_parameter();

    template <int... Dimensions>
    void templated_method_with_non_type_template_parameter_pack();

    template <auto Predicate>
    void templated_method_with_placeholder_non_type_template_parameter();

    template <typename U, template <typename> typename X>
    void templated_method_with_template_template_parameter(X<U>);

    template <typename U, int size, template <typename, int> typename Container = std::array>
    void templated_method_with_defaulted_template_template_parameter(Container<U, size>);

    template <typename U, template <typename> typename... Container>
    void templated_method_with_template_template_parameter_pack(Container<U>...);
};

template <typename T>
void templated_function_with_type_template_parameter(T);

template <typename T = char>
void templated_function_with_defaulted_type_template_parameter(T);

template <typename... Ts>
void templated_function_with_type_template_parameter_pack(Ts...);

template <char Category>
void templated_function_with_non_type_template_parameter();

template <char Category = 'A'>
void templated_function_with_defaulted_non_type_template_parameter();

template <unsigned... Weights>
void templated_function_with_non_type_template_parameter_pack();

template <auto Iterator>
void templated_function_with_placeholder_non_type_template_parameter();

template <typename T, template <typename> typename K>
void templated_function_with_template_template_parameter(K<T>);

template <typename T, int size, template <typename, int> typename Container = std::array>
void templated_function_with_defaulted_template_template_parameter(Container<T, size>);

template <typename T, template <typename> typename... Container>
void templated_function_with_template_template_parameter_pack(Container<T>...);