SeqAn3 3.2.0
The Modern C++ library for sequence analysis.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
concept.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2006-2022, Knut Reinert & Freie Universität Berlin
3// Copyright (c) 2016-2022, Knut Reinert & MPI für molekulare Genetik
4// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6// -----------------------------------------------------------------------------------------------------
7
13#pragma once
14
15#include <concepts>
16
18
19namespace seqan3::detail
20{
28template <class T, class U>
29concept weakly_equality_comparable_with =
30 requires (std::remove_reference_t<T> const & t, std::remove_reference_t<U> const & u) {
31 requires std::convertible_to<decltype(t == u), bool>;
32 requires std::convertible_to<decltype(t != u), bool>;
33 requires std::convertible_to<decltype(u == t), bool>;
34 requires std::convertible_to<decltype(u != t), bool>;
35 };
37
45template <typename t1, typename t2>
46concept weakly_ordered_with =
47 requires (std::remove_reference_t<t1> const & v1, std::remove_reference_t<t2> const & v2) {
48 requires std::convertible_to<decltype(v1 < v2), bool>;
49 requires std::convertible_to<decltype(v1 <= v2), bool>;
50 requires std::convertible_to<decltype(v1 > v2), bool>;
51 requires std::convertible_to<decltype(v1 >= v2), bool>;
52
53 requires std::convertible_to<decltype(v2 < v1), bool>;
54 requires std::convertible_to<decltype(v2 <= v1), bool>;
55 requires std::convertible_to<decltype(v2 > v1), bool>;
56 requires std::convertible_to<decltype(v2 >= v1), bool>;
57 };
59
60} // namespace seqan3::detail
Provides platform and dependency checks.