mini-llvm
0.1.0
Toggle main menu visibility
Loading...
Searching...
No Matches
FPExt.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
3
#pragma once
4
5
#include <concepts>
6
#include <cstdlib>
7
8
namespace
mini_llvm::ops
{
9
10
template
<
typename
To>
11
requires
std::floating_point<To>
12
struct
FPExt
{
13
template
<
typename
From>
14
requires
std::floating_point<From>
15
To
operator()
(From)
const
noexcept
{
16
abort();
17
}
18
19
template
<
typename
From>
20
requires
(std::floating_point<From> &&
sizeof
(To) >=
sizeof
(From))
21
To
operator
()(From x)
const
noexcept
{
22
return
static_cast<
To
>
(x);
23
}
24
};
25
26
}
// namespace mini_llvm::ops
mini_llvm::ops
Definition
Add.h:9
mini_llvm::ops::FPExt
Definition
FPExt.h:12
mini_llvm::ops::FPExt::operator()
To operator()(From) const noexcept
Definition
FPExt.h:15
include
mini-llvm
common
ops
FPExt.h
Generated by
1.17.0