-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA16-2-3.hpp
More file actions
57 lines (32 loc) · 762 Bytes
/
A16-2-3.hpp
File metadata and controls
57 lines (32 loc) · 762 Bytes
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
// Rule: A16-2-3
// Source line: 27711
// Original file: A16-2-3.hpp
// $Id: A16-2-3.hpp 289436 2017-10-04 10:45:23Z michal.szczepankiewicz $
#ifndef HEADER_HPP
#define HEADER_HPP
#include <array>
#include <cstdint>
class B;
// Compliant - type B can be included using forward declaration
// std::into
// the header file
class OutOfRangeException
: public std::out_of_range
{
public:
using std::out_of_range::out_of_range;
// Non-compliant - <stdexcept> which defines
// out_of_range included
// implicitly through <array>
};
class A
{
public:
// Interface of class A
private:
std::array<std::uint32_t, 10>
mArray; // Compliant - <array> included explicitly
B* mB;
std::int32_t mX; // Compliant - <cstdint> included explicitly
};
#endif