SeqAn3
3.3.0
The Modern C++ library for sequence analysis.
Toggle main menu visibility
Welcome
Setup
Quick Setup (using CMake)
Tutorial
First steps with SeqAn
Parsing command line arguments with Sharg
C++ Concepts
Alphabets in SeqAn
Ranges
Minimisers
Sequence File Input and Output
Pairwise Alignment
Indexing and searching with SeqAn
SAM Input and Output in SeqAn
Implementing your own read mapper with SeqAn
How-To
Porting from SeqAn2
How to write an argument parser with subcommands
How to serialise SeqAn data structures
How to write a view
How to write your own alphabet
Cookbook
About
Stability and long-term promises
Citing
Customisation
Changelog
Copyright
Code of Conduct
Contributing
API Reference
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
integer_traits.hpp
Go to the documentation of this file.
1
// -----------------------------------------------------------------------------------------------------
2
// Copyright (c) 2006-2023, Knut Reinert & Freie Universität Berlin
3
// Copyright (c) 2016-2023, 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
8
#pragma once
9
10
#include <
limits
>
11
#include <
type_traits
>
12
13
#include <
seqan3/core/platform.hpp
>
14
20
namespace
seqan3::detail
21
{
22
23
// ------------------------------------------------------------------
24
// min_viable_uint_t
25
// ------------------------------------------------------------------
26
29
template
<u
int
64_t value>
30
using
min_viable_uint_t =
std::conditional_t
<
31
value <= 1ull,
32
bool,
33
std::conditional_t
<value <= 255ull,
34
uint8_t,
35
std::conditional_t
<value <= 65535ull,
36
uint16_t,
37
std::conditional_t<value <= 4294967295ull, uint32_t, uint64_t>
>>>;
38
42
template
<u
int
64_t value>
43
constexpr
auto
min_viable_uint_v =
static_cast<
min_viable_uint_t<value>
>
(value);
44
45
// ------------------------------------------------------------------
46
// size_in_values_v
47
// ------------------------------------------------------------------
48
51
template
<
typename
int
_t>
52
requires
std::is_integral_v<int_t>
53
constexpr
size_t
size_in_values_v =
54
static_cast<
size_t
>
(
std::numeric_limits<int_t>::max
()) -
std::numeric_limits<int_t>::lowest
() + 1;
55
56
}
// namespace seqan3::detail
std::conditional_t
limits
std::numeric_limits::max
T max(T... args)
std::numeric_limits
platform.hpp
Provides platform and dependency checks.
type_traits
seqan3
utility
detail
integer_traits.hpp
Generated on Thu Aug 17 2023 14:29:11 for SeqAn3 by
1.9.6