SeqAn3  3.0.1
The Modern C++ library for sequence analysis.
customisation_point.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2020, 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 <seqan3/core/platform.hpp>
16 
17 namespace seqan3::detail
18 {
19 
20 // ============================================================================
21 // priority_tag
22 // ============================================================================
23 
25 template <size_t I>
26 struct priority_tag
28 // Doxygen fail
29 : priority_tag<I-1>
31 {};
32 
34 template <>
35 struct priority_tag<0>
36 {};
37 
38 } // seqan3::detail
39 
40 // ============================================================================
41 // SEQAN3_CPO_IMPL
42 // ============================================================================
43 
45 #define SEQAN3_CPO_IMPL(PRIO, TERM) \
46  \
47 template <typename t, typename ...arg_ts> \
48 static constexpr decltype(auto) impl(seqan3::detail::priority_tag<PRIO>, \
49  [[maybe_unused]] t && v, \
50  [[maybe_unused]] arg_ts && ... args) \
51  noexcept(noexcept(TERM)) \
52  requires requires (seqan3::detail::priority_tag<PRIO> const &/*<- need for doxygen*/, t && v, arg_ts && ... args)\
53  { { TERM }; } \
54 { \
55  return TERM; \
56 }
platform.hpp
Provides platform and dependency checks.