remove \r
[extl.git] / extl / mpl / math / is_even.h
blobd612ab41be43fba90818b0e67a604254360fe474
1 /* ///////////////////////////////////////////////////////////////////////
2 * File: is_even.h
4 * Created: 08.03.17
5 * Updated: 08.05.05
7 * Brief: is_even<N>
9 * [<Home>]
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
12 #ifndef EXTL_MPL_MATH_IS_EVEN_H
13 #define EXTL_MPL_MATH_IS_EVEN_H
15 /*!\file is_even.h
16 * \brief is_even<N>
19 /* ///////////////////////////////////////////////////////////////////////
20 * Includes
22 #include "math.h"
23 #include "../int_.h"
25 /* ///////////////////////////////////////////////////////////////////////
26 * ::extl::mpl namespace
28 EXTL_MPL_BEGIN_WHOLE_NAMESPACE
29 /*!\brief: is_even class
31 * \ingroup extl_group_mpl
33 template < e_umax_int_t N >
34 struct is_even
36 EXTL_STATIC_MEMBER_CONST(e_bool_t, value = ((N % 2) == 0));
39 /* ///////////////////////////////////////////////////////////////////////
40 * Unit testing
42 #ifdef EXTL_MPL_MATH_IS_EVEN_TEST_ENABLE
43 # include "unit_test/is_even_test.h"
44 #endif
45 /* ///////////////////////////////////////////////////////////////////////
46 * ::extl::mpl namespace
48 EXTL_MPL_END_WHOLE_NAMESPACE
50 /* //////////////////////////////////////////////////////////////////// */
51 #endif /* EXTL_MPL_MATH_IS_EVEN_H */
52 /* //////////////////////////////////////////////////////////////////// */