Extended generation of method attributes (#142)

This commit is contained in:
Bartek Kryza
2023-05-29 23:19:28 +02:00
parent 75b900bf46
commit 097f7a11ed
13 changed files with 158 additions and 11 deletions

View File

@@ -103,8 +103,16 @@ struct Static { };
struct Const { };
struct Constexpr { };
struct Consteval { };
struct Noexcept { };
struct Default { };
struct Deleted { };
struct HasCallWithResultMatcher : ContainsMatcher {
HasCallWithResultMatcher(
CasedString const &comparator, CasedString const &resultComparator)
@@ -530,6 +538,12 @@ ContainsMatcher IsMethod(std::string const &name,
pattern += "(" + params + ")";
if constexpr (has_type<Constexpr, Ts...>())
pattern += " constexpr";
if constexpr (has_type<Consteval, Ts...>())
pattern += " consteval";
if constexpr (has_type<Const, Ts...>())
pattern += " const";
@@ -539,6 +553,9 @@ ContainsMatcher IsMethod(std::string const &name,
if constexpr (has_type<Default, Ts...>())
pattern += " = default";
if constexpr (has_type<Deleted, Ts...>())
pattern += " = deleted";
pattern += " : " + type;
return ContainsMatcher(CasedString(pattern, caseSensitivity));