SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
integer_traits.hpp File Reference

Provides metaprogramming utilities for integer types. More...

#include <limits>
#include <type_traits>
#include <seqan3/core/platform.hpp>
+ Include dependency graph for integer_traits.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  seqan3
 The main SeqAn3 namespace.
 
namespace  seqan3::detail
 The internal SeqAn3 namespace.
 

Typedefs

template<uint64_t value>
using seqan3::detail::min_viable_uint_t = std::conditional_t< value<=1ull, bool, std::conditional_t< value<=255ull, uint8_t, std::conditional_t< value<=65535ull, uint16_t, std::conditional_t< value<=4294967295ull, uint32_t, uint64_t > > > >
 Given a value, return the smallest unsigned integer that can hold it.
 

Variables

template<uint64_t value>
constexpr auto seqan3::detail::min_viable_uint_v = static_cast<min_viable_uint_t<value>>(value)
 Given a value, cast the value as the smallest unsigned integer that can hold it.
 
template<typename int_t >
constexpr size_t seqan3::detail::size_in_values_v
 Return the number of values an integral type can have, i.e. the difference between min and max.
 

Detailed Description

Provides metaprogramming utilities for integer types.

Author
Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de>
Hide me