Zserio C++17 runtime library
1.3.0
Built for Zserio 2.20.0
Loading...
Searching...
No Matches
BitPositionUtil.h
Go to the documentation of this file.
1
#ifndef ZSERIO_BITPOSITION_UTIL_H_INC
2
#define ZSERIO_BITPOSITION_UTIL_H_INC
3
4
#include <cstddef>
5
6
#include "
zserio/BitSize.h
"
7
8
namespace
zserio
9
{
10
19
inline
constexpr
BitSize
alignTo
(
BitSize
alignmentValue
,
BitSize
bitPosition
)
20
{
21
return
(
bitPosition
> 0 &&
alignmentValue
!= 0)
22
? (((
bitPosition
- 1) /
alignmentValue
) + 1) *
alignmentValue
23
:
bitPosition
;
24
}
25
26
}
// namespace zserio
27
28
#endif
// ifndef ZSERIO_BITPOSITION_UTIL_H_INC
BitSize.h
zserio::View
Definition
Traits.h:15
zserio
Definition
AllocatorHolder.h:8
zserio::alignTo
constexpr BitSize alignTo(BitSize alignmentValue, BitSize bitPosition)
Definition
BitPositionUtil.h:19
zserio
BitPositionUtil.h
Generated by
1.9.8