SeqAn3  3.0.3
The Modern C++ library for sequence analysis.
record_like.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2021, 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/io/record.hpp>
17 
18 namespace seqan3::detail
19 {
20 
22 template <typename record_t>
24 {
25 private:
28 
30  template <typename ...args_t>
32 public:
33 
35  static constexpr bool value = decltype(derived_from(std::declval<record_t &>())){};
36 };
37 
43 template <typename record_t>
44 SEQAN3_CONCEPT record_like = tuple_like<record_t> &&
45  is_derived_from_record<std::remove_cvref_t<record_t>>::value;
47 } // namespace seqan3::detail
The concept for a type that models a record.
Whether a type behaves like a tuple.
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Provides the seqan3::record template and the seqan3::field enum.
Helper struct to implement seqan3::detail::record_like.
Definition: record_like.hpp:24
static std::true_type derived_from(seqan3::record< args_t... > &)
Helper function to determine whether the given record_t is derived_from seqan3::record.
static constexpr bool value
Whether the given record_t is derived_from seqan3::record.
Definition: record_like.hpp:35
static std::false_type derived_from(...)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The class template that file records are based on; behaves like an std::tuple.
Definition: record.hpp:223
Provides seqan3::tuple_like.