SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::is_type_specialisation_of< source_t, target_template > Struct Template Reference

Determines whether a source_type is a specialisation of another template. More...

#include <seqan3/core/detail/template_inspection.hpp>

+ Inheritance diagram for seqan3::detail::is_type_specialisation_of< source_t, target_template >:

Related Symbols

(Note that these are not member symbols.)

template<typename source_t , template< typename... > typename target_template>
constexpr bool is_type_specialisation_of_v = is_type_specialisation_of<source_t, target_template>::value
 Helper variable template for seqan3::detail::is_type_specialisation_of (unary_type_trait shortcut).
 

Detailed Description

template<typename source_t, template< typename... > typename target_template>
struct seqan3::detail::is_type_specialisation_of< source_t, target_template >

Determines whether a source_type is a specialisation of another template.

Template Parameters
source_typeThe source type.
target_templateThe type template you wish to compare against (must take only types as template arguments).

Example

// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: CC0-1.0
#include <vector>
int main()
{
using my_type = std::vector<int>;
if constexpr (seqan3::detail::is_type_specialisation_of_v<my_type, std::vector>) // Note: std::vector has no <> !
{
// ...
}
}
Provides type traits for working with templates.

Friends And Related Symbol Documentation

◆ is_type_specialisation_of_v

template<typename source_t , template< typename... > typename target_template>
template<typename source_t , template< typename... > typename target_template>
constexpr bool is_type_specialisation_of_v = is_type_specialisation_of<source_t, target_template>::value
related

Helper variable template for seqan3::detail::is_type_specialisation_of (unary_type_trait shortcut).

Template Parameters
source_typeThe source type.
target_templateThe type template you wish to compare against (must take only types as template arguments).

The documentation for this struct was generated from the following file:
Hide me