di
0.1.0
Loading...
Searching...
No Matches
align_down.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
di/function/curry_back.h
"
4
#include "
di/meta/language.h
"
5
#include "
di/meta/util.h
"
6
7
namespace
di::math
{
8
namespace
detail {
9
struct
AlignDownFunction {
10
template
<concepts::Integer T>
11
constexpr
auto
operator()(T a,
meta::TypeIdentity<T>
b)
const
-> T {
12
return
a / b * b;
13
}
14
};
15
}
16
17
constexpr
inline
auto
align_down
=
function::curry_back
(detail::AlignDownFunction {},
meta::c_<2ZU>
);
18
}
19
20
namespace
di
{
21
using
math::align_down
;
22
}
curry_back.h
language.h
di::function::curry_back
constexpr auto curry_back
Definition
curry_back.h:141
di::math
Definition
abs.h:10
di::math::align_down
constexpr auto align_down
Definition
align_down.h:17
di::meta::TypeIdentity
Type< TypeConstant< T > > TypeIdentity
This is a helper template to prevent C++ from deducing the type of template argument.
Definition
core.h:32
di::meta::c_
constexpr auto c_
A value of type Constexpr<val>.
Definition
constexpr.h:252
di
Definition
any_storable.h:9
util.h
di
math
align_down.h
Generated by
1.13.2