summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/cpp11-migrate/PassByValue/basic.h
blob: 4b551f7d908a546e3e0bc281b773777620a64721 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef BASIC_H
#define BASIC_H

// POD types are trivially move constructible
struct Movable {
  int a, b, c;
};

struct NotMovable {
  NotMovable() = default;
  NotMovable(const NotMovable &) = default;
  NotMovable(NotMovable &&) = delete;
  int a, b, c;
};

// The test runs the migrator without header modifications enabled for this
// header making the constructor parameter M unmodifiable.
struct UnmodifiableClass {
  UnmodifiableClass(const Movable &M);
  Movable M;
};

#endif // BASIC_H
OpenPOWER on IntegriCloud