[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / depr / depr.auto.ptr / auto.ptr / AB.h
blobfd5c323e3a923b67f8903ca34392b87561a62c49
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef AB_H
10 #define AB_H
12 #include <cassert>
14 class A
16 int id_;
17 public:
18 explicit A(int id) : id_(id) {++count;}
19 A(const A& a) : id_(a.id_) {++count;}
20 virtual ~A() {assert(id_ >= 0); id_ = -1; --count;}
22 A& operator=(const A& other) { id_ = other.id_; return *this; }
24 static int count;
27 int A::count = 0;
29 class B
30 : public A
32 public:
33 explicit B(int id) : A(id) {++count;}
34 B(const B& a) : A(a) {++count;}
35 virtual ~B() {--count;}
37 static int count;
40 int B::count = 0;
42 #endif // AB_H