SeqAn3
3.0.2
The Modern C++ library for sequence analysis.
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
int_types.hpp
Go to the documentation of this file.
1
// -----------------------------------------------------------------------------------------------------
2
// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3
// Copyright (c) 2016-2020, 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 <
seqan3/std/concepts
>
11
#include <
limits
>
12
#include <type_traits>
13
14
#include <
seqan3/core/platform.hpp
>
15
21
namespace
seqan3::detail
22
{
23
24
// ------------------------------------------------------------------
25
// min_viable_uint_t
26
// ------------------------------------------------------------------
27
29
template
<u
int
64_t value>
30
using
min_viable_uint_t =
std::conditional_t
<value <= 1ull, bool,
31
std::conditional_t
<value <= 255ull, uint8_t,
32
std::conditional_t
<value <= 65535ull, uint16_t,
33
std::conditional_t<value <= 4294967295ull, uint32_t, uint64_t>
>>>;
34
37
template
<u
int
64_t value>
38
constexpr
auto
min_viable_uint_v =
static_cast<
min_viable_uint_t<value>
>
(value);
39
40
// ------------------------------------------------------------------
41
// size_in_values_v
42
// ------------------------------------------------------------------
43
45
template
<std::
int
egral
int
_t>
46
constexpr
size_t
size_in_values_v =
static_cast<
size_t
>
(
std::numeric_limits<int_t>::max
()) -
47
std::numeric_limits<int_t>::lowest
() + 1;
48
49
}
// namespace seqan3::detail
concepts
The Concepts library.
platform.hpp
Provides platform and dependency checks.
limits
std::conditional_t
std::numeric_limits::max
T max(T... args)
std::numeric_limits
Version:
main_user
main_dev
3.4.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.2
3.0.1
3.0.0
seqan3
core
detail
int_types.hpp
Generated on Thu Dec 3 2020 18:58:18 for SeqAn3 by
1.8.20