SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
adaptor_for_view_without_args.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
13
14namespace seqan3::detail
15{
16
17// ============================================================================
18// adaptor_for_view_without_args
19// ============================================================================
20
44template <template <typename, typename...> typename view_type>
45class adaptor_for_view_without_args : public adaptor_base<adaptor_for_view_without_args<view_type>>
46{
47private:
50
52 friend base_type;
53
60 template <typename... arg_types>
61 static auto impl(arg_types &&... args)
62 {
63 return view_type{std::forward<arg_types>(args)...};
64 }
65
66public:
71 constexpr adaptor_for_view_without_args() = default;
73 constexpr adaptor_for_view_without_args(adaptor_for_view_without_args const &) noexcept = default;
77 constexpr adaptor_for_view_without_args & operator=(adaptor_for_view_without_args const &) noexcept = default;
79 constexpr adaptor_for_view_without_args & operator=(adaptor_for_view_without_args &&) noexcept = default;
81 ~adaptor_for_view_without_args() noexcept = default;
82
84 using base_type::base_type;
86};
87
88} // namespace seqan3::detail
Provides seqan3::detail::adaptor_base and seqan3::detail::combined_adaptor.
CRTP-base to simplify the definition of range adaptor closure objects and similar types.
Definition adaptor_base.hpp:74
Template for range adaptor closure objects that store no arguments and always delegate to the view co...
Definition adaptor_for_view_without_args.hpp:46
constexpr adaptor_for_view_without_args(adaptor_for_view_without_args const &) noexcept=default
Defaulted.
friend base_type
Befriend the base class so it can call impl().
Definition adaptor_for_view_without_args.hpp:52
static auto impl(arg_types &&... args)
Call the view's constructor with the given arguments (all of the base class'es operators ultimately r...
Definition adaptor_for_view_without_args.hpp:61
constexpr adaptor_for_view_without_args(adaptor_for_view_without_args &&) noexcept=default
Defaulted.
constexpr adaptor_for_view_without_args()=default
Defaulted.
The internal SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
Hide me