mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 17:31:58 -05:00
AK: Replace 'consteval' with 'constexpr' in some Variant helpers
CLion and/or clangd didn't like the consteval and highlighted visit() as an error, just replace it with constexpr as it makes no difference here.
This commit is contained in:
parent
04d68117c2
commit
9cf1c382df
1 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ struct Variant<IndexType, InitialIndex> {
|
|||
template<typename IndexType, typename... Ts>
|
||||
struct VisitImpl {
|
||||
template<typename RT, typename T, size_t I, typename Fn>
|
||||
static consteval bool has_explicitly_named_overload()
|
||||
static constexpr bool has_explicitly_named_overload()
|
||||
{
|
||||
// If we're not allowed to make a member function pointer and call it directly (without explicitly resolving it),
|
||||
// we have a templated function on our hands (or a function overload set).
|
||||
|
@ -90,7 +90,7 @@ struct VisitImpl {
|
|||
}
|
||||
|
||||
template<typename ReturnType, typename T, typename Visitor, auto... Is>
|
||||
static consteval bool should_invoke_const_overload(IndexSequence<Is...>)
|
||||
static constexpr bool should_invoke_const_overload(IndexSequence<Is...>)
|
||||
{
|
||||
// Scan over all the different visitor functions, if none of them are suitable for calling with `T const&`, avoid calling that first.
|
||||
return ((has_explicitly_named_overload<ReturnType, T, Is, typename Visitor::Types::template Type<Is>>()) || ...);
|
||||
|
|
Loading…
Reference in a new issue