BioC++
core-0.7.0
The Modern C++ libraries for Bioinformatics.
Loading...
Searching...
No Matches
transformation_trait_or.hpp
Go to the documentation of this file.
1
// -----------------------------------------------------------------------------------------------------
2
// Copyright (c) 2022 deCODE Genetics
3
// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
4
// Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
5
// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
6
// shipped with this file and also available at: https://github.com/biocpp/biocpp-core/blob/main/LICENSE.md
7
// -----------------------------------------------------------------------------------------------------
8
14
#pragma once
15
16
#include <
type_traits
>
17
18
#include <
bio/meta/type_traits/concept.hpp
>
19
20
namespace
bio::meta
21
{
22
43
template
<
typename
type_t,
typename
default_t>
44
using
transformation_trait_or
=
std::conditional_t<transformation_trait<type_t>
,
// check if type_t::type exists
45
type_t,
// if yes, return type_t
46
std::type_identity<default_t>
>;
// else return default_t as trait
47
52
template
<
typename
type_t,
typename
default_t>
53
using
transformation_trait_or_t
=
typename
transformation_trait_or<type_t, default_t>::type
;
54
55
}
// namespace bio::meta
std::conditional_t
bio::meta::transformation_trait_or_t
typename transformation_trait_or< type_t, default_t >::type transformation_trait_or_t
Helper type of bio::meta::transformation_trait_or (transformation_trait shortcut).
Definition:
transformation_trait_or.hpp:53
concept.hpp
Provides the concepts bio::meta::transformation_trait and bio::meta::unary_type_trait.
bio::meta
The Meta module's namespace.
std::type_identity
type_traits
bio
meta
type_traits
transformation_trait_or.hpp
Generated on Thu Mar 30 2023 15:25:52 for BioC++ by
1.9.6