-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathcpputil.h
More file actions
27 lines (18 loc) · 733 Bytes
/
Copy pathcpputil.h
File metadata and controls
27 lines (18 loc) · 733 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
// Copyright (C) 2022 Satya Das and CppParser contributors
// SPDX-License-Identifier: MIT
#ifndef C1DD4A12_AE7D_412D_BB5C_D180EAABE992
#define C1DD4A12_AE7D_412D_BB5C_D180EAABE992
// TODO: Do we need this file?
#include "cppast/cppconst.h"
#include <optional>
namespace cppast {
inline CppAccessType DefaultAccessType(CppCompoundType type)
{
return (type == CppCompoundType::CLASS) ? CppAccessType::PRIVATE : CppAccessType::PUBLIC;
}
inline CppAccessType ResolveInheritanceType(const std::optional<CppAccessType>& inheritanceType, CppCompoundType type)
{
return (inheritanceType.has_value()) ? inheritanceType.value() : DefaultAccessType(type);
}
} // namespace cppast
#endif /* C1DD4A12_AE7D_412D_BB5C_D180EAABE992 */