tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
llabs.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4
#
ifndef
TETL_CSTDLIB_LLABS_HPP
5
#
define
TETL_CSTDLIB_LLABS_HPP
6
7
#
include
<
etl
/
_math
/
abs
.
hpp
>
8
9
namespace
etl
{
10
11
/// \brief Computes the absolute value of an integer number. The behavior is
12
/// undefined if the result cannot be represented by the return type. If abs
13
/// is called with an unsigned integral argument that cannot be converted to int
14
/// by integral promotion, the program is ill-formed.
15
[[
nodiscard
]]
constexpr
auto
llabs
(
long
long
n)
noexcept
->
long
long
16
{
17
return
detail::abs_impl<
long
long
>(n);
18
}
19
20
}
// namespace etl
21
22
#
endif
// TETL_CSTDLIB_LLABS_HPP
etl
Definition
adjacent_find.hpp:9
etl::llabs
constexpr auto llabs(long long n) noexcept -> long long
Computes the absolute value of an integer number. The behavior is undefined if the result cannot be r...
Definition
llabs.hpp:15
include
etl
_cstdlib
llabs.hpp
Generated on Sun Sep 7 2025 19:14:53 for tetl by
1.9.8