blob: 01b11a4a631edce40e4f034ecc1a2eb45b4a0a43 (
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
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef ECHO_H
#define ECHO_H
#include "libsamplemacros.h"
#include "str.h"
class ObjectType;
class Echo
{
public:
LIBMINIMAL_DEFAULT_COPY_MOVE(Echo)
Echo() noexcept = default;
~Echo() = default;
void doNothingWithConstBool(const bool hi);
void methodWithNamedArg(const Str &string = Str{});
Str operator()(const Str &s, const int i) { return s + i; }
// These method are here just for compilation test purposes
Echo &operator<<(unsigned int item);
Echo &operator<<(signed int item);
Echo &operator<<(const ObjectType *item);
Echo &operator<<(Str str);
};
inline void Echo::doNothingWithConstBool(const bool)
{
}
inline void Echo::methodWithNamedArg(const Str &)
{
}
inline Echo &Echo::operator<<(unsigned int)
{
return *this;
}
inline Echo &Echo::operator<<(signed int)
{
return *this;
}
inline Echo &Echo::operator<<(const ObjectType *)
{
return *this;
}
inline Echo &Echo::operator<<(Str)
{
return *this;
}
#endif // ECHO_H
|