Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
srcs
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.0
F
) == 2.0
F
);
8
static_assert(
util::abs
(-2) == 2);
9
static_assert(
util::abs
(-2L) == 2L);
10
static_assert(
util::abs
(-2LL) == 2LL);
11
}
F
#define F(v)
Definition:
sbnana/sbnana/CAFAna/Analysis/Surface.cxx:280
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.
main
int main(int argc, char **argv)
Definition:
DetectorActivityRatePlots.cpp:996
Generated by
1.8.5