Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC13 #73

Merged
merged 2 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ jobs:
build_type: Debug
cxx_flags: "-fsanitize=address,undefined"

- name: "Unit gcc13 Debug"
cxx: "g++-13"
cc: "gcc-13"
pkg: "gcc-13 g++-13"
build: unit
build_type: Debug

- name: "Integration gcc12"
cxx: "g++-12"
cc: "gcc-12"
Expand Down
69 changes: 41 additions & 28 deletions include/bio/alphabet/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ class base
friend constexpr auto tag_invoke(custom::to_rank, derived_type const a) noexcept { return a.to_rank(); }

//!\brief tag_invoke() wrapper around member.
friend constexpr derived_type & tag_invoke(custom::assign_rank_to, rank_type const r, derived_type & a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr derived_type & tag_invoke(custom::assign_rank_to, rank_type const r, derived_type_ & a) noexcept
requires(requires {
{
a.assign_rank(r)
Expand All @@ -211,7 +212,8 @@ class base
}

//!\brief tag_invoke() wrapper around member.
friend constexpr auto tag_invoke(custom::to_char, derived_type const a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr auto tag_invoke(custom::to_char, derived_type_ const a) noexcept
requires(requires {
{
a.to_char()
Expand All @@ -222,7 +224,8 @@ class base
}

//!\brief tag_invoke() wrapper around member.
friend constexpr derived_type & tag_invoke(custom::assign_char_to, char_type const c, derived_type & a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr derived_type_ & tag_invoke(custom::assign_char_to, char_type const c, derived_type_ & a) noexcept
requires(requires {
{
a.assign_char(c)
Expand All @@ -233,39 +236,43 @@ class base
}

//!\brief tag_invoke() wrapper around member.
friend constexpr bool tag_invoke(custom::char_is_valid_for, char_type const c, derived_type) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr bool tag_invoke(custom::char_is_valid_for, char_type const c, derived_type_) noexcept
requires(requires {
{
derived_type::char_is_valid(c)
derived_type_::char_is_valid(c)
};
})
{
return derived_type::char_is_valid(c);
return derived_type_::char_is_valid(c);
}

//!\brief tag_invoke() wrapper around member.
template <std::same_as<derived_type> derived_type_>
friend constexpr bool tag_invoke(custom::char_is_valid_for,
char_type const c,
std::type_identity<derived_type>) noexcept
std::type_identity<derived_type_>) noexcept
requires(requires {
{
derived_type::char_is_valid(c)
derived_type_::char_is_valid(c)
};
} && !meta::constexpr_default_initializable<derived_type>)
} && !meta::constexpr_default_initializable<derived_type_>)
{
return derived_type::char_is_valid(c);
return derived_type_::char_is_valid(c);
}

//!\brief tag_invoke() wrapper around member.
friend consteval auto tag_invoke(custom::size, derived_type) noexcept
requires meta::constexpr_default_initializable<derived_type>
template <std::same_as<derived_type> derived_type_>
friend consteval auto tag_invoke(custom::size, derived_type_) noexcept
requires meta::constexpr_default_initializable<derived_type_>
{
return size;
}

//!\brief tag_invoke() wrapper around member.
friend consteval auto tag_invoke(custom::size, std::type_identity<derived_type>) noexcept
requires(!meta::constexpr_default_initializable<derived_type>)
template <std::same_as<derived_type> derived_type_>
friend consteval auto tag_invoke(custom::size, std::type_identity<derived_type_>) noexcept
requires(!meta::constexpr_default_initializable<derived_type_>)
{
return size;
}
Expand Down Expand Up @@ -367,7 +374,8 @@ class base<derived_type, 1ul, char_t>
}

//!\brief tag_invoke() wrapper around member.
friend constexpr auto tag_invoke(custom::to_char, derived_type const a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr auto tag_invoke(custom::to_char, derived_type_ const a) noexcept
requires(requires {
{
a.to_char()
Expand All @@ -378,7 +386,8 @@ class base<derived_type, 1ul, char_t>
}

//!\brief tag_invoke() wrapper around member.
friend constexpr derived_type & tag_invoke(custom::assign_char_to, char_type const c, derived_type & a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr derived_type_ & tag_invoke(custom::assign_char_to, char_type const c, derived_type_ & a) noexcept
requires(requires {
{
a.assign_char(c)
Expand All @@ -389,39 +398,43 @@ class base<derived_type, 1ul, char_t>
}

//!\brief tag_invoke() wrapper around member.
friend constexpr bool tag_invoke(custom::char_is_valid_for, char_type const c, derived_type) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr bool tag_invoke(custom::char_is_valid_for, char_type const c, derived_type_) noexcept
requires(requires {
{
derived_type::char_is_valid(c)
derived_type_::char_is_valid(c)
};
} && std::is_nothrow_default_constructible_v<derived_type>)
} && std::is_nothrow_default_constructible_v<derived_type_>)
{
return derived_type::char_is_valid(c);
return derived_type_::char_is_valid(c);
}

//!\brief tag_invoke() wrapper around member.
template <std::same_as<derived_type> derived_type_>
friend constexpr bool tag_invoke(custom::char_is_valid_for,
char_type const c,
std::type_identity<derived_type>) noexcept
std::type_identity<derived_type_>) noexcept
requires(requires {
{
derived_type::char_is_valid(c)
derived_type_::char_is_valid(c)
};
} && !std::is_nothrow_default_constructible_v<derived_type>)
} && !std::is_nothrow_default_constructible_v<derived_type_>)
{
return derived_type::char_is_valid(c);
return derived_type_::char_is_valid(c);
}

//!\brief tag_invoke() wrapper around member.
friend consteval auto tag_invoke(custom::size, derived_type) noexcept
requires meta::constexpr_default_initializable<derived_type>
template <std::same_as<derived_type> derived_type_>
friend consteval auto tag_invoke(custom::size, derived_type_) noexcept
requires meta::constexpr_default_initializable<derived_type_>
{
return alphabet_size;
}

//!\brief tag_invoke() wrapper around member.
friend consteval auto tag_invoke(custom::size, std::type_identity<derived_type>) noexcept
requires(!meta::constexpr_default_initializable<derived_type>)
template <std::same_as<derived_type> derived_type_>
friend consteval auto tag_invoke(custom::size, std::type_identity<derived_type_>) noexcept
requires(!meta::constexpr_default_initializable<derived_type_>)
{
return alphabet_size;
}
Expand Down
65 changes: 39 additions & 26 deletions include/bio/alphabet/proxy_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ class proxy_base
friend constexpr auto tag_invoke(custom::to_rank, derived_type const a) noexcept { return a.to_rank(); }

//!\brief tag_invoke() wrapper around member.
friend constexpr derived_type & tag_invoke(custom::assign_rank_to, auto const r, derived_type & a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr derived_type_ & tag_invoke(custom::assign_rank_to, auto const r, derived_type_ & a) noexcept
requires(requires {
{
a.assign_rank(r)
Expand All @@ -297,9 +298,10 @@ class proxy_base
}

//!\brief tag_invoke() wrapper around member.
friend constexpr derived_type const & tag_invoke(custom::assign_rank_to,
auto const r,
derived_type const & a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr derived_type_ const & tag_invoke(custom::assign_rank_to,
auto const r,
derived_type_ const & a) noexcept
requires(requires {
{
a.assign_rank(r)
Expand All @@ -310,7 +312,8 @@ class proxy_base
}

//!\brief tag_invoke() wrapper around member.
friend constexpr auto tag_invoke(custom::to_char, derived_type const a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr auto tag_invoke(custom::to_char, derived_type_ const a) noexcept
requires(requires {
{
a.to_char()
Expand All @@ -321,7 +324,8 @@ class proxy_base
}

//!\brief tag_invoke() wrapper around member.
friend constexpr derived_type & tag_invoke(custom::assign_char_to, char_type const c, derived_type & a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr derived_type_ & tag_invoke(custom::assign_char_to, char_type const c, derived_type_ & a) noexcept
requires(requires {
{
a.assign_char(c)
Expand All @@ -332,9 +336,10 @@ class proxy_base
}

//!\brief tag_invoke() wrapper around member.
friend constexpr derived_type const & tag_invoke(custom::assign_char_to,
char_type const c,
derived_type const & a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr derived_type_ const & tag_invoke(custom::assign_char_to,
char_type const c,
derived_type_ const & a) noexcept
requires(requires {
{
a.assign_char(c)
Expand All @@ -345,45 +350,50 @@ class proxy_base
}

//!\brief tag_invoke() wrapper around member.
friend constexpr bool tag_invoke(custom::char_is_valid_for, char_type const c, derived_type) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr bool tag_invoke(custom::char_is_valid_for, char_type const c, derived_type_) noexcept
requires(requires {
{
derived_type::char_is_valid(c)
derived_type_::char_is_valid(c)
};
})
{
return derived_type::char_is_valid(c);
return derived_type_::char_is_valid(c);
}

//!\brief tag_invoke() wrapper around member.
template <std::same_as<derived_type> derived_type_>
friend constexpr bool tag_invoke(custom::char_is_valid_for,
char_type const c,
std::type_identity<derived_type>) noexcept
std::type_identity<derived_type_>) noexcept
requires(requires {
{
derived_type::char_is_valid(c)
derived_type_::char_is_valid(c)
};
} && !meta::constexpr_default_initializable<derived_type>)
} && !meta::constexpr_default_initializable<derived_type_>)
{
return derived_type::char_is_valid(c);
return derived_type_::char_is_valid(c);
}

//!\brief tag_invoke() wrapper around member.
friend consteval auto tag_invoke(custom::size, derived_type) noexcept
requires meta::constexpr_default_initializable<derived_type>
template <std::same_as<derived_type> derived_type_>
friend consteval auto tag_invoke(custom::size, derived_type_) noexcept
requires meta::constexpr_default_initializable<derived_type_>
{
return alphabet_size;
}

//!\brief tag_invoke() wrapper around member.
friend consteval auto tag_invoke(custom::size, std::type_identity<derived_type>) noexcept
requires(!meta::constexpr_default_initializable<derived_type>)
template <std::same_as<derived_type> derived_type_>
friend consteval auto tag_invoke(custom::size, std::type_identity<derived_type_>) noexcept
requires(!meta::constexpr_default_initializable<derived_type_>)
{
return alphabet_size;
}

//!\brief tag_invoke() wrapper around member.
friend constexpr auto tag_invoke(custom::complement, derived_type const a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr auto tag_invoke(custom::complement, derived_type_ const a) noexcept
requires(requires {
{
a.complement()
Expand All @@ -394,7 +404,8 @@ class proxy_base
}

//!\brief tag_invoke() wrapper around member.
friend constexpr phred_type tag_invoke(custom::to_phred, derived_type const a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr phred_type tag_invoke(custom::to_phred, derived_type_ const a) noexcept
requires(requires {
{
a.to_phred()
Expand All @@ -405,7 +416,8 @@ class proxy_base
}

//!\brief tag_invoke() wrapper around member.
friend constexpr derived_type & tag_invoke(custom::assign_phred_to, phred_type const p, derived_type & a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr derived_type_ & tag_invoke(custom::assign_phred_to, phred_type const p, derived_type_ & a) noexcept
requires(requires {
{
a.assign_phred(p)
Expand All @@ -416,9 +428,10 @@ class proxy_base
}

//!\brief tag_invoke() wrapper around member.
friend constexpr derived_type const & tag_invoke(custom::assign_phred_to,
phred_type const p,
derived_type const & a) noexcept
template <std::same_as<derived_type> derived_type_>
friend constexpr derived_type_ const & tag_invoke(custom::assign_phred_to,
phred_type const p,
derived_type_ const & a) noexcept
requires(requires {
{
a.assign_phred(p)
Expand Down
Loading
Loading