Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
lardataalg
test
Utilities
constexpr_math_test.cc
Go to the documentation of this file.
1
#include "
lardataalg/Utilities/constexpr_math.h
"
2
3
int
main
()
4
{
5
static_assert(
util::abs
(-0.0) == 0.0);
6
static_assert(
util::abs
(-2.0) == 2.0);
7
static_assert(
util::abs
(-2.0F) == 2.0F);
8
static_assert(
util::abs
(-2) == 2);
9
static_assert(
util::abs
(-2L) == 2L);
10
static_assert(
util::abs
(-2LL) == 2LL);
11
}
main
int main()
Definition:
constexpr_math_test.cc:3
util::abs
constexpr auto abs(T v)
Returns the absolute value of the argument.
Definition:
constexpr_math.h:40
constexpr_math.h
Mathematical functions that C++ standard doesn't require constexpr.
Generated by
1.8.11