BioC++ core-0.7.0
The Modern C++ libraries for Bioinformatics.
 
Loading...
Searching...
No Matches
template_inspection.hpp File Reference

Provides various traits to inspect templates. More...

+ Include dependency graph for template_inspection.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  bio::meta::is_type_specialisation_of< source_t, target_template >
 Determines whether a source_type is a specialisation of another template. More...
 
struct  bio::meta::is_type_specialisation_of< source_t, target_template >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
struct  bio::meta::is_value_specialisation_of< source_t, target_template >
 Provides concept bio::meta::template_specialisation_of<mytype, [...]> for checking the type specialisation of some type with a given template, for example a specialized type_list<float> with the type_list template. More...
 
struct  bio::meta::transfer_template_args_onto< source_template< source_arg_types... >, target_template >
 Extracts a type template's type arguments and specialises another template with them. More...
 
struct  bio::meta::transfer_template_vargs_onto< source_template< source_varg_types... >, target_template >
 Extracts a type template's non-type arguments and specialises another template with them. More...
 
struct  bio::meta::valid_template_spec_or< fallback_t, templ_t, spec_t >
 Exposes templ_t<spec_t...> if that is valid, otherwise fallback_t. More...
 
struct  bio::meta::valid_template_spec_or< fallback_t, templ_t, spec_t... >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 

Namespaces

namespace  bio
 The main BioC++ namespace.
 
namespace  bio::meta
 The Meta module's namespace.
 

Typedefs

template<typename t >
using bio::meta::strip_type_identity_t = std::conditional_t< is_type_specialisation_of_v< t, std::type_identity >, transformation_trait_or_t< t, void >, t >
 A transformation trait shortcut that returns the type inside a std::type_identity or the type itself.
 
template<typename source_type , template< typename... > typename target_template>
using bio::meta::transfer_template_args_onto_t = typename transfer_template_args_onto< source_type, target_template >::type
 Shortcut for bio::meta::transfer_template_args_onto (transformation_trait shortcut).
 
template<typename source_type , template< auto... > typename target_template>
using bio::meta::transfer_template_vargs_onto_t = typename transfer_template_vargs_onto< source_type, target_template >::type
 Shortcut for bio::meta::transfer_template_vargs_onto (transformation_trait shortcut).
 
template<typename fallback_t , template< typename... > typename templ_t, typename... spec_t>
using bio::meta::valid_template_spec_or_t = typename valid_template_spec_or< fallback_t, templ_t, spec_t... >::type
 Helper for bio::meta::valid_template_spec_or (transformation_trait shortcut).
 

Variables

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 bio::meta::detail::is_type_specialisation_of (unary_type_trait shortcut).
 
template<typename source_t , template< auto... > typename target_template>
constexpr bool is_value_specialisation_of_v = is_value_specialisation_of<source_t, target_template>::value
 Helper variable template for bio::meta::is_value_specialisation_of (unary_type_trait shortcut).
 

Detailed Description

Provides various traits to inspect templates.

Author
Hannes Hauswedell <hannes.hauswedell AT decode.is>

Variable Documentation

◆ is_type_specialisation_of_v

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
inlineconstexpr

Helper variable template for bio::meta::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).

◆ is_value_specialisation_of_v

template<typename source_t , template< auto... > typename target_template>
constexpr bool is_value_specialisation_of_v = is_value_specialisation_of<source_t, target_template>::value
inlineconstexpr

Helper variable template for bio::meta::is_value_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).