diff --git a/include/loki/details/pddl/equal_to.hpp b/include/loki/details/pddl/equal_to.hpp index fd82788..cafd9c0 100644 --- a/include/loki/details/pddl/equal_to.hpp +++ b/include/loki/details/pddl/equal_to.hpp @@ -19,7 +19,6 @@ #define LOKI_INCLUDE_LOKI_PDDL_EQUAL_TO_HPP_ #include "loki/details/pddl/declarations.hpp" -#include "loki/details/utils/concepts.hpp" #include #include diff --git a/include/loki/details/pddl/hash.hpp b/include/loki/details/pddl/hash.hpp index a73a76a..08343ef 100644 --- a/include/loki/details/pddl/hash.hpp +++ b/include/loki/details/pddl/hash.hpp @@ -19,8 +19,6 @@ #define LOKI_INCLUDE_LOKI_PDDL_HASH_HPP_ #include "loki/details/pddl/declarations.hpp" -#include "loki/details/utils/concepts.hpp" -#include "loki/details/utils/unique_factory.hpp" #include #include @@ -79,11 +77,10 @@ struct UniquePDDLHasher }; /// Spezialization for std::variant. -template -requires IsVariant -struct UniquePDDLHasher +template +struct UniquePDDLHasher> { - size_t operator()(const Variant& variant) const + size_t operator()(const std::variant& variant) const { return std::visit([](const auto& arg) { return UniquePDDLHasher()(arg); }, variant); } diff --git a/include/loki/details/utils/concepts.hpp b/include/loki/details/utils/concepts.hpp deleted file mode 100644 index 7c7320a..0000000 --- a/include/loki/details/utils/concepts.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2023 Dominik Drexler and Simon Stahlberg - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *< - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef LOKI_INCLUDE_LOKI_UTILS_CONCEPTS_HPP_ -#define LOKI_INCLUDE_LOKI_UTILS_CONCEPTS_HPP_ - -#include -#include -#include -#include -#include -#include - -namespace loki -{ - -template -struct dependent_false : std::false_type -{ -}; - -template -concept IsArithmetic = std::is_arithmetic_v; - -template -concept IsIntegral = std::is_integral_v; - -template -concept IsUnsignedIntegral = std::is_integral_v && std::is_unsigned_v; - -template -concept IsRangeOver = std::ranges::range && std::same_as, Value>; - -template -struct is_variant : std::false_type -{ -}; - -template -struct is_variant> : std::true_type -{ -}; - -template -concept IsVariant = is_variant::value; - -static_assert(IsVariant>); -static_assert(!IsVariant); - -template -concept IsDereferencable = requires(T a) -{ - // Check that the type supports dereferencing - { *a }; - // Check that the type can be converted to bool - { static_cast(a) }; -}; - -static_assert(IsDereferencable>); -static_assert(IsDereferencable); -static_assert(!IsDereferencable); - -} - -#endif