Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gauthier Quesnel
irritator
Commits
81d567a6
Commit
81d567a6
authored
Sep 18, 2020
by
Gauthier Quesnel
Browse files
core: add template to_unsigned function
parent
75b4b1ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/include/irritator/core.hpp
View file @
81d567a6
...
...
@@ -109,6 +109,14 @@ using u32 = uint32_t;
using
u64
=
uint64_t
;
using
sz
=
size_t
;
template
<
typename
Integer
>
constexpr
typename
std
::
make_unsigned
<
Integer
>::
type
to_unsigned
(
Integer
value
)
{
irt_assert
(
value
>=
0
);
return
static_cast
<
typename
std
::
make_unsigned
<
Integer
>::
type
>
(
value
);
}
/*****************************************************************************
*
* Return status of many function
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment